
Liel - 2009-04-11 21:57:47
Hi, I love using this class, but I currently updating my site to support unicode based user input I get the awful q-marks (on this post are seen as �) - take a look at the output near the word vision.
If anyone has a suggestion, I would appreciate!
CODE:
// PRINT BEFORE ($fields is $_POST)
print_r($fields);
// Allow minimal html structure.
$tags =array("br","p","strong","em","ul","li","a", "ol");
$attr =array("href", "title", "alt");
$myFilter = new InputFilter($tags, $attr);
$fields = $myFilter->process($fields);
// PRINT AFTER($fields is $_POST)
print_r($fields);
OUTPUT:
Array
(
[mission] => <p><strong>My new </strong><em><strong>vision ZçÇáà éèíì óòõú<br>
</strong></em><a href="http://mokoko.com">Kookok</a></p>
<p> </p>
<p> </p>
)
Array
(
[mission] => <p><strong>My new </strong><em><strong>vision Z���� ���� ����<br>
</strong></em><a href="http://mokoko.com">Kookok</a></p>
<p>�</p>
<p>�</p>
)