Forum
PerchUtil::html() or HTML->encode()
Hey Drew. In working on a couple new apps I have begun to wonder when to use one or the other...
PerchUtil::html() or HTML->encode()
I have looked through official Perch Apps and of course I see both being used. I have noticed when your inside php tags you'll use HTML->encode() and if your just using a short php echo within html you seem to use PerchUtil::html()...
Can you explain when to use each? When I look at the actual class.php for each I see they both use the same final class method.
Use
HTML->encode()
.PerchUtil::html()
isn't really part of the public API.