discussion and development of piem
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: piem@inbox.kyleam.com
Subject: [PATCH 2/2] Unescape message IDs extracted from URLs
Date: Sat, 19 Sep 2020 00:46:39 -0400	[thread overview]
Message-ID: <20200919044639.26871-3-kyle@kyleam.com> (raw)
In-Reply-To: <20200919044639.26871-1-kyle@kyleam.com>

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


      parent reply	other threads:[~2020-09-19  4:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-19  4:46 [PATCH 0/2] URL escaping fixes Kyle Meyer
2020-09-19  4:46 ` [PATCH 1/2] Escape message IDs when constructing URLs Kyle Meyer
2020-09-19  4:46 ` Kyle Meyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://git.kyleam.com/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200919044639.26871-3-kyle@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=piem@inbox.kyleam.com \
    --subject='Re: [PATCH 2/2] Unescape message IDs extracted from URLs' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.kyleam.com/piem/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).