[Seaside-dev] 3.1 repo?

Philippe Marschall philippe.marschall at gmail.com
Sat Oct 23 18:37:58 UTC 2010


2010/10/23 Paolo Bonzini <bonzini at gnu.org>:
> On 10/23/2010 07:47 PM, Philippe Marschall wrote:
>>
>> GST:
>> dunno
>
> Needs small changes, but with proper unit tests it should not be a problem.
>
>> There's still a place left where there's a mix of byte and character
>> oriented data and that's URLs. Encoding works like this:
>>  1. encode using  the URL codec
>>  2. escape URL unsafe characters
>>  3. escape HTML unsafe characters
>>  4. encode with the page encoding
>>
>> The problem is step 1 will now deliver a ByteArray (which is
>> technically correct) but step 2 and 3 expect a String. Step 2 could be
>> changed to work with a ByteArray but step 3 can't. So we still need a
>> way to go from ByteArray to String without an encoding.
>
> At step 3 you should have only ASCII characters, so making (2) output a
> String should be trivial.
>
>> Depending on the solution chosen for URL encoding we might end up
>> losing our URL encoding shortcut (#includesUnsafeUrlCharacter:) which
>> is likely going to degrade performance on link intensive pages. The
>> corresponding primitive could easily be written for ByteArray but I'm
>> not sure we want to go that way.
>
> Maybe the String primitive just works if you add it to ByteArray.  Dunno
> about Squeak, but it's often the case for these primitives in GST.

Indeed it does, so much for strong typing.

Cheers
Philippe


More information about the seaside-dev mailing list