- [HACK] Code to generate more pinging services 'Pingoat'
- [PLUGIN] Audio/Video player with RSS enclosure hack
#1 May 16, 2006 18:42
Under some rare circumstances, Chinese characters (possibly other UTF-8 encoded characters too) at the end of a line may be "truncated" by the auto_p renderer, resulting in incorrect display of content. I am not 100% sure, but it seems to occur when the character code ends with '0', e.g., 你(4F60), 怠(6020). It only happens to the character at the end of a line.
I have to change the following line in _auto_p.renderer.php to work around this problem:
//if ($this->br) $pee = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $pee); //Remove \s* from pattern if ($this->br) $pee = preg_replace('|(?<!<br />)\n|', "<br />\n", $pee);
So far this works for me, but is there any potential problem with this modification? Is there a better way of doing it?
Thanks in advance for any advice. :)