It seems to the problem is that

jQuery('.flash').html(decodeURIComponent(escape(flash))).slideDown();

should be

jQuery('.flash').html(decodeURIComponent(flash)).slideDown();

we should not escape it because it can be an arbitrary string. In fact is 
can be a serialized helper containing html.

Massimo

On Thursday, 14 June 2012 16:11:31 UTC-5, Niphlod wrote:
>
> Not trying to be a pain in the ass, but it's actually simple:
>
> take welcome, add a function as 
>
> def test():
>     response.flash = 'òàùòè+'
>     return dict()
>
>
>
> then, in default.html, add
>
> {{=LOAD('default', 'test', ajax=True)}}
>
> and voilà.
> Using the last firebug you'll also get a complaint about "malformed URI 
> sequence ". Reviewing the headers sent, you can spot this
>
> web2py-component-flash   òà ùòè+
>
> this line 
>
> jQuery('.flash').html(decodeURIComponent(escape(flash))).slideDown();
>
> is the one complaining .... escape works, as escape('òà ùòè+') = 
> "%C3%B2%C3%20%C3%B9%C3%B2%C3%A8+" but decodeURIComponent on that fails.
>
>

Reply via email to