Hi,
I have same problem:

response.flash = T('Thank you for your reply!')
return
Thank%20you%20for%20your%20reply%21



gluon/main.py
                if request.cid:
                    if response.flash:
                        http_response.headers['web2py-component-flash'] = \
                            urllib2.quote(xmlescape(response.flash)\
                                              .replace('\n',''))

xmlescape(response.flash) -> Thank you for your reply!
urllib2.quote -> s=Thank you for your reply!
    return ''.join(map(quoter, s))

map(quoter, s) ->
list: ['T', 'h', 'a', 'n', 'k', 's', '%20', 'f', 'o', 'r', '%20', 'y', 'o', 
'u', 'r', '%20', 'r', 'e', 'p', 'l', 'y', '%21']

Thank%20you%20for%20your%20reply%21

Any solution?

On Monday, October 22, 2012 4:59:15 AM UTC+2, weheh wrote:
>
> There appears to be some new code in gluon/main.py to handle component 
> flash.
>
> # @line 564 in gluon/main.py
> if response.flash:
>     http_response.headers['web2py-component-flash'] = urllib2.quote(
> xmlescape(response.flash).replace('\n',''))
>
>
> Problem with this is that urllib2.quote() is putting %20s everywhere there 
> are spaces in my flash message, which causes the whole flash message to get 
> messed up. Take away the urllib2.quote() function and everything is OK.
>
> Is urllib2.quote() really necessary here? I can't imagine why, 'cause I 
> don't know how to keep it from messing up my flash message.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to