summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfpi <git@pie.tf>2020-04-03 19:12:01 +0200
committerBastien <bzg@gnu.org>2020-05-22 17:54:41 +0200
commit928e67df7e22ac4f10742966ff8d049bba798441 (patch)
tree5330006d18c9b455b46c3dd2f7a59ab4c63856a8
parentcd336c2af365fbfe89a1004060603b1eb520151f (diff)
downloadorg-mode-928e67df.tar.gz
org-protocol: Allow slashes after sub-protocol
* lisp/org-protocol.el (org-protocol-check-filename-for-protocol): Handle URIs with additional slashes before the start of the query string, e.g. "org-protocol:/capture/?template=..." instead of "org-protocol:/capture?template=...", as neede for some browsers. TINYCHANGE
-rw-r--r--lisp/org-protocol.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
index 35f58f4..4bc7cee 100644
--- a/lisp/org-protocol.el
+++ b/lisp/org-protocol.el
@@ -623,13 +623,13 @@ CLIENT is ignored."
(let ((proto
(concat the-protocol
(regexp-quote (plist-get (cdr prolist) :protocol))
- "\\(:/+\\|\\?\\)")))
+ "\\(:/+\\|/*\\?\\)")))
(when (string-match proto fname)
(let* ((func (plist-get (cdr prolist) :function))
(greedy (plist-get (cdr prolist) :greedy))
(split (split-string fname proto))
(result (if greedy restoffiles (cadr split)))
- (new-style (string= (match-string 1 fname) "?")))
+ (new-style (string-match "/*?" (match-string 1 fname))))
(when (plist-get (cdr prolist) :kill-client)
(message "Greedy org-protocol handler. Killing client.")
(server-edit))