Zend Framework Forum

Go Back   Zend Framework Forum > Zend Framework General discussions > General Q&A on Zend Framework

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-11-2009, 12:53 PM
Member
 
Join Date: Sep 2009
Posts: 98
Default problem with Zend_Filter_HtmlEntities

Hi

i have a form for comments and it work great with english and hebrew untill i add the filer Zend_Filter_HtmlEntities.
if i remove the filer i can send in hebrew but the i can use javascript in the form, so there is a security issue here.

i echoed the post variable with and without the filter:
without the hebrew is there.
with: instead of the hebrew i get all sorts of symbols.

the page charset is utf-8, and hebrew is displyed.

this is the implementation:
Code:
           $htmlentities = new Zend_Filter_HtmlEntities();

           $name = $htmlentities->filter($this->_request->getPost('name'));
           $title = $htmlentities->filter($this->_request->getPost('title'));
$commentField=$htmlentities->filter($this->_request->getPost('comment'));
what am i doing wrong here?

best regards

ron
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-11-2009, 05:00 PM
Member
 
Join Date: Sep 2009
Posts: 98
Default hi there is an answer

hi

i found this article that addresses this very problem, it is explained great and worked for me:
htmlentities and character encoding Drowned World

hope it will help others too

ron
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT. The time now is 12:06 AM.


Designed by: Miner Skinz Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0