Subject: bug#17958: SHR: base handling broken (shr-parse-base, shr-expand-url)

From: Ted Zlatanov <[email-masked]>
Date: Tue, 04 Nov 2014 11:44:07 -0500

On Thu, 14 Aug 2014 18:50:20 +0000 Ivan Shmakov <[email-masked]> wrote: 

>> Thus, I suggest changing shr-expand-url to return not the 0th element
>> of the (parsed) ‘base’ (see below), but the 3rd.

...

IS> 	With the patch MIMEd (which also fixes the issue described in my
IS> 	initial bug report), it instead gives what I deem to be the
IS> 	correct result:

IS> (let ((shr-base (shr-parse-base "http://example.org/")))
IS>   (shr-tag-base '((:href . "/relative")))
IS>   shr-base)
IS> ;; ⇒
IS> ("http://example.org" "/" "http" "http://example.org/relative")

This seems reasonable to me as far as usability but Lars will have to
review the patch for correctness.

Ted