Ejemplo n.º 1
0
 def __call__(self, message):
     """Set a message to be displayed in the browser on next page display."""
     
     logging.info("Setting flash: %s" % message)
     
     message = tg_util.quote_cookie(tg_util.to_utf8(message))
     response.cookie['tg_flash'] = message
     response.cookie['tg_flash']['path'] = '/'
Ejemplo n.º 2
0
def test_quote_cookie():
    assert util.quote_cookie ('Hello, W\xf6rld') \
        == 'Hello%2C%20W\xf6rld'
    assert util.quote_cookie ('$1;\tinsert coin!') \
        == '%241%3B%09insert%20coin!'
Ejemplo n.º 3
0
def test_quote_cookie():
    assert util.quote_cookie ('Hello, W\xf6rld') \
        == 'Hello%2C%20W\xf6rld'
    assert util.quote_cookie ('$1;\tinsert coin!') \
        == '%241%3B%09insert%20coin!'