[squeak-dev] Re: [Seaside] SqueakSource/Seaside question - has anyone seen this problem before?

Philippe Marschall philippe.marschall at gmail.com
Sat Dec 28 19:45:11 UTC 2013


On Mon, Dec 23, 2013 at 5:04 PM, Bob Arning <arning315 at comcast.net> wrote:
> I see how it happens...
>
> using Mac, Chrome with 8859-1 encoding as default, I typed
>
>     S, t, option-e, e, p, h, a, n, e
>
> in the login screen. What arrives back at the server is
>
>     '11=St%E9phane&12=&13=Login'
>
> wherupon HttpRequest tries to parse this
> -----
> decodeUrlEncodedForm: string multipleValues: boolean
>     | dict key value start end eqSignPos more |
>     dict _ boolean ifTrue: [HttpFormDictionary new] ifFalse: [Dictionary
> new].
>     string isEmptyOrNil ifTrue: [^dict].
>     more _ true.
>     start _ 1.
>     [end _ string indexOf: $& startingAt: start.
>     end == 0
>         ifTrue: [end _ string size. more _ false]
>         ifFalse: [end _ end - 1].
>     eqSignPos _ string indexOf: $= startingAt: start.
>     (eqSignPos > end or: [eqSignPos == 0])
>         ifTrue: [key _ (key _ string copyFrom: start to: end)
> unescapePercents.
>             value _ '']
>         ifFalse: [key _ (key _ string copyFrom: start to: eqSignPos-1)
> unescapePercents.
>             value _ (value _ string copyFrom: eqSignPos+1 to: end)
> unescapePercents].
>     self addKey: key value: value toForm: dict multipleValues: boolean.
>     start _ end + 2.
>     more] whileTrue.
>
>     ^dict
> -----
> and #unescapePercents does
>
> self unescapePercentsWithTextEncoding: 'utf-8'

Is that the same image as www.squeaksource.com? If so was the image
ever updated? AFAIK the method did ISO-8859-1 previously.

Cheers
Philippe


More information about the seaside mailing list