]> git.donarmstrong.com Git - org-ref.git/blobdiff - org-ref.org
trim urls in case they have leading or trailing spaces.
[org-ref.git] / org-ref.org
index 40fe0412895ff46d609baabef730e2395f6f76a5..4e5b5415ba5182f6302e86727a526cafb6d1319a 100644 (file)
@@ -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))))))))