haxr (XML RPC) rendering of string values

Björn Bringert bringert at cs.chalmers.se
Mon Dec 5 11:37:11 EST 2005


Johannes Waldmann wrote:
>>"Any characters are allowed in a string except < and &, which are
>>encoded as &lt; and &amp;. A string can be used to encode binary data."
> 
> 
> I made the quick "fix" of adding the last line in Internals:
> 
> readString :: Monad m => String -> Err m String
> readString = return . replace "&amp;" "&" . replace "&lt;" "<"
>              . replace "&gt;" ">"
>              . replace "&#32;" " "

Since this only adds to my already incredibly inefficient hack for 
handling entity references, it's of course not a long term solution. 
I'll try to write something better. I had forgotten that I used this 
crazy hack.

/Björn


More information about the Libraries mailing list