[twill] meta http-equiv refresh content syntax

Jonathan Rogers jrogers at socialserve.com
Wed Oct 5 15:12:05 PDT 2011


Leon Robbins wrote:
> Why is
>
> URL=/login
>
> bounded by single quotes? The examples on this Wikipedia page omit them:

That's exactly what I've been trying to figure out. The HTML in question
is in "tests/twilltestserver.py". TwillTest.test_refresh3() in that
module has the single-quoted value. Test script
"tests/test-equiv-refresh.twill" expects that value to cause Twill to
reload "/login". It seems that's what it did using the old, internal
version of mechanize.

Using a current version of mechanize, no reload occurs. Normal browsers
like Firefox and Chromium try to reload "/URL=/login" itself as a URL,
which is a non-existent page. I haven't been able to find a clear
specification for the format of the content attribute of the meta
element. It's doesn't seem to be specified in either HTML or HTTP and I
suspect it's just supposed to work how Netscape implemented it. Since
Firefox is a current Mozilla browser, it may be the most authoritative.


>
> http://en.wikipedia.org/wiki/Meta_refresh
>
> What happens if you leave them out too?
>

Without the single quotes, everything works as expected. That's what
TwillTest.test_refresh2() does.

-- 
Jonathan Ross Rogers




More information about the twill mailing list