How do I escape the escape() function?

For programming and general questions on Zend Framework
Post Reply
bentobenji
Posts: 6
Joined: Tue Apr 28, 2009 3:44 pm

How do I escape the escape() function?

Post by bentobenji » Tue Apr 28, 2009 7:14 pm

Sorry for the cute play on words. I need some comic relief after trying to pinpoint why the html stored in my mysql table was not rendering in the browser display.

I'm pretty sure that escape is the culprit, and Zend doesn't allow me to just grab a variable directly without it. So...the question is, how do I customize it to NOT escape html characters in SOME cases, but not necessarily all?

PHP htmlspecialchars() function is the one used by default, and this page gives me some info and some options:
http://framework.zend.com/manual/en/zen ... ripts.html

However I can't find specifically how to get around my particular issue.

Anyone have specific directions?

User avatar
ericritchie
Posts: 118
Joined: Tue Feb 10, 2009 10:09 am

Re: How do I escape the escape() function?

Post by ericritchie » Wed Apr 29, 2009 10:12 am

Hi Bento,

I answered in your other thread:

viewtopic.php?f=63&t=572

Regards,
Eric Ritchie.

bentobenji
Posts: 6
Joined: Tue Apr 28, 2009 3:44 pm

Re: How do I escape the escape() function?

Post by bentobenji » Wed Apr 29, 2009 11:42 am

I really thank you for this! I suspected it was something I could re-encode with a php function, but you saved me from having to find it.

I guess zend is super serious about security for good reason, so I can feel better about not disabling the escape function.

Coming from a design background, in terms of coding I know just a little bit below water level of the tip of the ice burg.

Thanks again!! have a great day!

Post Reply