2010年10月29日星期五

Re: [fw-mvc] Auto HTML escaper module for Zend_View.

On Oct 29, 2010, at 9:23 AM, chikaram wrote:

>
> Hi everyone,
>
> I love ZendFramework and I wanted my team use it.
> But that you couldn't escape vars in view automatically was its biggest
> drawbacks.
>
> So I write this - auto HTML escaper module for Zend_View:
> http://github.com/chikaram/gnix-view
>
>
> It's been working well on a medium-scale project - about 45,000SLOC, 900M
> PVs/Month.
> We are very happy because we don't need to bother with writing
> $this->escape() all the time we use view variables.
>
> If you are interested, please use it and let me know how you feel.
>
> Regards,
>
> Chikaram
> http://twitter.com/chikaram
>
> --
> View this message in context: http://zend-framework-community.634137.n4.nabble.com/Auto-HTML-escaper-module-for-Zend-View-tp3019090p3019090.html
> Sent from the Zend MVC mailing list archive at Nabble.com.

I for one, don't always output to HTML, so automatically escaping for HTML would break my code. Plus, I'm sure the overheard for automatically parsing the whole view file in order to escape HTML entities would be a bit much.

-Henry

没有评论: