Unescape html text

Alexandre Jasmin alex at R4p70r.net
Wed May 23 06:19:40 UTC 2007


URL Encoding ('a%20b') and HTML Character entities 'a b' are two
completely different things.


You may want to install network-HTML from SqueakMap and take a look at
#replaceHtmlCharRefs in class String.

  is unicode 160 (Non-breaking space). If you need the normal space
character you could also do:
replaceAll: (Character value: 160) with: (Character space)



Le mardi 22 mai 2007 à 18:12 -0600, Brian Murphy-Dye a écrit :
> Is there an existing method that is the opposite of  
> String>>encodeForHTTP, e.g., converting
>   'a b' into 'a b'?
> 
> #unescapePercents takes care of converting the percent signs;
>   'a%26b' unescapePercents => 'a&b'
> but can't find anything for the "special" escape sequences.
> 
> Brian.
> 
> 




More information about the Squeak-dev mailing list