discussion and development of piem
 help / color / mirror / Atom feed
* [PATCH 2/2] Unescape message IDs extracted from URLs
  2020-09-19  4:46 [PATCH 0/2] URL escaping fixes Kyle Meyer
@ 2020-09-19  4:46 ` Kyle Meyer
  0 siblings, 0 replies; only message in thread
From: Kyle Meyer @ 2020-09-19  4:46 UTC (permalink / raw)
  To: piem

All downstream code expects unescaped message IDs.
---
 piem-elfeed.el | 2 +-
 piem-eww.el    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/piem-elfeed.el b/piem-elfeed.el
index 24b3108..add7547 100644
--- a/piem-elfeed.el
+++ b/piem-elfeed.el
@@ -45,7 +45,7 @@ (defun piem-elfeed-get-mid ()
              (inbox-url (piem-inbox-get :url inbox))
              (link (elfeed-entry-link elfeed-show-entry)))
     (and (string-match (piem-message-link-re inbox-url) link)
-         (match-string 1 link))))
+         (url-unhex-string (match-string 1 url)))))
 
 ;;;###autoload
 (define-minor-mode piem-elfeed-mode
diff --git a/piem-eww.el b/piem-eww.el
index 9fd34ac..849a3b5 100644
--- a/piem-eww.el
+++ b/piem-eww.el
@@ -44,7 +44,7 @@ (defun piem-eww-get-mid ()
              (inbox-url (piem-inbox-get :url inbox))
              (url (plist-get eww-data :url)))
     (and (string-match (piem-message-link-re inbox-url) url)
-         (match-string 1 url))))
+         (url-unhex-string (match-string 1 url)))))
 
 ;;;###autoload
 (define-minor-mode piem-eww-mode
-- 
2.28.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-19  4:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-19  4:46 [PATCH 0/2] URL escaping fixes Kyle Meyer
2020-09-19  4:46 ` [PATCH 2/2] Unescape message IDs extracted from URLs Kyle Meyer

discussion and development of piem

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.kyleam.com/piem/0 piem/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 piem piem/ https://inbox.kyleam.com/piem \
		piem@inbox.kyleam.com
	public-inbox-index piem

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.piem


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git