+ Reply to Thread
Results 1 to 2 of 2

Thread: problem with Zend_Filter_HtmlEntities

  1. #1
    derrida is offline Member
    Join Date
    Sep 2009
    Posts
    99

    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

  2. #2
    derrida is offline Member
    Join Date
    Sep 2009
    Posts
    99

    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

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts