From: John Kitchin Date: Tue, 24 Feb 2015 15:36:34 +0000 (-0500) Subject: trim urls in case they have leading or trailing spaces. X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=commitdiff_plain;h=b261cfa0bef3767623fc689785fe160f6ab6c20c;hp=86398931c210878a59e970f83c9fd782f9d874c4 trim urls in case they have leading or trailing spaces. --- diff --git a/org-ref.org b/org-ref.org index 40fe041..4e5b541 100644 --- a/org-ref.org +++ b/org-ref.org @@ -1776,14 +1776,14 @@ We need some convenience functions to open act on the citation at point. These w (catch 'done (let ((url (bibtex-autokey-get-field "url"))) (when url - (browse-url url) + (browse-url (s-trim url)) (throw 'done nil))) (let ((doi (bibtex-autokey-get-field "doi"))) (when doi (if (string-match "^http" doi) (browse-url doi) - (browse-url (format "http://dx.doi.org/%s" doi))) + (browse-url (format "http://dx.doi.org/%s" (s-trim doi)))) (throw 'done nil))))))))