When using wapreader with courier-imap, sometimes if i have " symbol message text wapreader creates incorrect wml:
<p>
from:&quot;user&quot; <user@rambler.ru> <br/>
subj: <br/>
<a href="/wapreader/wapreader.php?action=view&msg=1561&sid=fb26caa7475b47c4959ba82093154c12">[view >>>]</a><br/>
<br/>
</p>
Small bug is in function wmlspecialchars, that replace '&' symbol with &.
I attach patch for it:
--- ./wapreader.php Sun Nov 20 19:30:51 2005
+++ ./wapreader.php Sun Nov 20 20:10:30 2005
@@ -621,6 +621,7 @@
function wmlspecialchars($text)
{
$text=str_replace( array("\"","'","&","<",">","$"), array(""","'","&","<",">","$$"), $text);
+ $text=str_replace( array("&quot;"), array("""), $text);
return $text;
}
Have a fun :D