i mentioned it because actually we don't use htmlentities now! here is
function:
function common_xml_safe_str($str){
$xmlStr = htmlentities(iconv('UTF-8', 'UTF-8//IGNORE', $str), ENT_NOQUOTES,
'UTF-8');
// Replace control, formatting, and surrogate characters with '*', ala Twitter
return preg_replace('/[\p{Cc}\p{Cf}\p{Cs}]/u', '*', $str);
}
$str is passing to preg_replace witch is not converted by htmlentities!
now if we pass $xmlStr to preg_replace we have problem with XMLWriter::text
because it will replace entitries. for example after passing $xmlStr ZWNJ
will convert to &XWNJ; (like what we expect) but when result passes to
MLWriter::text our character will convert to ‌ (& =>
&).
---
actually i think a mistake happened here (passing $str to preg_replace not
$xmlStr) and after fixing it we need to use XMLWriter::writeCData instead of
XMLWriter::text because converting & to &
===
happy Nowrooz - http://en.wikipedia.org/wiki/Nowrooz
--
You Rock! Your E-Mail Should Too! Signup Now at Rock.com and get 250MB of
Storage!
http://webmail.rock.com/signup/
_______________________________________________
Laconica-dev mailing list
[email protected]
http://mail.laconi.ca/mailman/listinfo/laconica-dev