help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EWW, Duckduck go and Oops error


From: Yuri Khan
Subject: Re: EWW, Duckduck go and Oops error
Date: Thu, 27 Apr 2017 11:57:07 +0700

On Thu, Apr 27, 2017 at 2:10 AM, Kaushal Modi <address@hidden> wrote:

> (when (or (string-match "^\\([0-9]+\\) *;.*url=\"\\([^\"]+\\)\"" refresh)
>  (string-match "^\\([0-9]+\\) *;.*url='\\([^']+\\)'" refresh)
>  (string-match "^\\([0-9]+\\) *;.*url=\\([^ ]+\\)" refresh))

This does not look exactly right according to [HTML 5.1 § 4.2.5.3
subheading “Refresh state”][1].

[1]: 
https://www.w3.org/TR/html51/document-metadata.html#statedef-http-equiv-refresh

* There may be leading whitespace in the content attribute.
* The refresh delay, which is a non-empty sequence of ASCII digits,
may be immediately followed by a period and more digits or periods,
which are to be ignored.
* The time and URL may be separated with a semicolon or comma, with
optional whitespace at either or both sides.
* The “url” parameter is the only one allowed, it must immediately
follow the separator, its name is case-insensitive and may be omitted
along with the equal sign.
* There may be whitespace at either or both sides of the equal sign.
* The way I read it, spaces in an unquoted (or quoted) url are
permitted, although trailing whitespace is invalid and will be removed
by the basic URL parser algorithm.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]