Hello,
I was adding htmlentities filter to my forms and I had the following
problem while testing:
echo htmlentities("lorem ips'um üntela", ENT_QUOTES, 'utf-8');
//outputs: lorem ips'um üntela
This works the same as the filter above.
echo htmlspecialchars("lorem ips'um üntela", ENT_QUOTES);
//outputs: lorem ips'um üntela
$htmlEntitiesFilter = new Zend_Filter_HtmlEntities(array('quotestyle'
=> ENT_QUOTES));
echo $htmlEntitiesFilter->filter("lorem ips'um üntela");
//outputs: lorem ips'um üntela
I want the filter to only convert the quotes. But it converts the
non-latin chars too.
The htmlspecialchars output is what I want. But could not get it with
zend filter tough I defined the quote style.
And I could not find an htmlspecialchars filter in the manual.
Doing something wrong or shall I write a custom filter?
Thanks,
scs