[Top][All Lists]

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

bug#39235: 26.3; SHR: base handling errors on "."

From: Lars Ingebrigtsen
Subject: bug#39235: 26.3; SHR: base handling errors on "."
Date: Thu, 20 Feb 2020 15:15:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Kevin Brubeck Unhammer <address@hidden> writes:

>     (require 'shr)
>     (let ((shr-base (shr-parse-base ".")))
>        (shr-expand-url "www.example.com"))
> errors with
> Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
>   url-scheme-get-property(nil expand-file-name)
>   url-expand-file-name("www.example.com" "./")
>   shr-expand-url("www.example.com")

The bug here doesn't seem to be with "." per se, but when both the base
and the URL to be expanded have no protocol.

(let ((shr-base (shr-parse-base "/tmp")))
   (shr-expand-url "foo"))
=> error

(let ((shr-base (shr-parse-base "foo:/tmp")))
   (shr-expand-url "foo"))
=> "foo:foo"

(let ((shr-base (shr-parse-base "/tmp")))
   (shr-expand-url "foo:foo"))
=> "foo:foo"

I've now fixed this in the url.el library in Emacs 28.

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

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