From b261cfa0bef3767623fc689785fe160f6ab6c20c Mon Sep 17 00:00:00 2001 From: John Kitchin Date: Tue, 24 Feb 2015 10:36:34 -0500 Subject: [PATCH 1/1] trim urls in case they have leading or trailing spaces. --- org-ref.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)))))))) -- 2.39.2