[Seaside] sexprs, newlines and brs .. is this a bug?
Ragnar Hojland Espinosa
seaside@lists.squeakfoundation.org
Fri, 2 Aug 2002 11:50:15 +0200
--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Thu, Aug 01, 2002 at 10:17:06AM -0700, Avi Bryant wrote:
> On Thu, 1 Aug 2002, Ragnar Hojland Espinosa wrote:
>
> > This works fine
> >
> > descr _ '<hello world>'.
> >
> > as in #html, the [descr] <> chars are correctly escaped. However, I have a
> > multiline variable, with some newlines. Shouldnt they get escaped to <BR>s?
>
> That's a good question. You're probably right - do you want to submit a
> patch to String>>seaEscapeHtml? Or just file a bug report at
> bugs.beta4.com and I'll get around to it.
Changed the newline to <BR> in the attached file.
--
Ragnar Hojland - Project Manager
Linalco "Especialistas Linux y en Software Libre"
Tel: +34-91-5970074 Fax: +34-91-5970083
--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=unknown-8bit
Content-Disposition: attachment; filename="String-seaEscapeHtml.st"
Content-Transfer-Encoding: quoted-printable
'From Squeak 3.2 of 11 July 2002 [latest update: #4917] on 2 August 2002 at=
11:45:58 am'!=0D=0D!String methodsFor: 'seaside' stamp: 'RHE 8/2/2002 11:4=
3'!=0DseaEscapeHtml=0D
| stream entities|=0D
entities _ #('' '=01' '=02' '=03' '=04' '=05' '=06' '=07' '=08' ' ' '' '=
=0B' '=0C' '<br>' '=0E' '=0F' '=10' '=11' '=12' '=13' '=14' '=15' '=16' '=
=17' '=18' '=19' '=1A' '=1B' '=1C' '=1D' '=1E' '=1F' ' ' '!!' '"' '#' '$' '=
%' '&' '''' '(' ')' '*' '+' ',' '-' '.' '/' '0' '1' '2' '3' '4' '5' '6'=
'7' '8' '9' ':' ';' '<' '=3D' '>' '?' '@' 'A' 'B' 'C' 'D' 'E' 'F' 'G=
' 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O' 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' '=
Z' '[' '\' ']' '^' '_' '`' 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' =
'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z' '{' '|' '}' '~' '=
=7F' 'Ä' 'Å' 'Ç' 'É' 'Ñ' 'Ö' 'Ü' =
'á' 'à' 'â' 'ä' 'ã' 'å' 'ç' '&=
eacute;' 'è' 'ê' 'ë' 'í' 'ì' 'î' '&iu=
ml;' 'ñ' 'ó' 'ò' 'ô' 'ö' 'õ' '&uacut=
e;' 'ù' 'û' 'ü' '¹' '°' '¢' '£' '&sec=
t;' '=82' '¶' 'ß' '®' '©' '=8E' '´' '¨' '­=
;' 'Æ' 'Ø' '=8D' '±' '²' '³' '¥' 'µ=
' '¦' '·' '¸' ' ' '¼' 'ª' 'º' '&f=
rac12;' 'æ' 'ø' '¿' '¡' '¬' '=92' '=80' '=81'=
'=8C' '«' '»' '=83' '¾' 'À' 'Ã' 'Õ=
' '=91' '=93' 'Ð' '=84' '=96' '=94' '=95' '=90' '÷' '×' '&=
yuml;' 'Ý' '=98' '=97' '=86' '=99' 'Þ' '¤' '=88' '=87' =
'=89' '=8B' '=8A' 'Â' 'Ê' 'Á' 'Ë' 'È' '&Iacu=
te;' 'Î' 'Ï' 'Ì' 'Ó' 'Ô' 'ð' 'Ò' =
'Ú' 'Û' 'Ù' '=9B' '=9A' '=85' '=8F' '=9D' '=9C' '=9E' '=
=9F' 'ý' 'þ' '&hibar;').=0D
=0D
stream _ WriteStream on: String new.=0D
self do: [:c| stream nextPutAll: (entities at: c asciiValue + 1)]. =0D
=0D
^ stream contents asString! !=0D
--sm4nu43k4a2Rpi4c--