plemieux
Založený: 11.05.2005
Príspevky: 20
Zaslal: 2005-09-16 22:15
Návrat hore
Odpovedať s citátom
|
I'd like to encode some special characters not covered by htmlspecialchars() function.
I would like to apply the following function to all text fields:
| Kód: |
function CleanupSmartQuotes($text) {
$badwordchars=array(
chr(145), //lsquo
chr(146), //rsquo
chr(147), //ldquo
chr(148), //rdquo
chr(151) //mdash
);
$fixedwordchars=array(
"‘",
"’",
'“',
'”',
'—'
);
return str_replace($badwordchars,$fixedwordchars,$text);
} |
Do I need to modify PME class? If so, what part do I need to modify?
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|