GNU bug report logs - #55873
28.1; browse-url-encode-url escaped dollar symbol

Previous Next

Package: emacs;

Reported by: urugang <urugang <at> gmail.com>

Date: Thu, 9 Jun 2022 15:05:01 UTC

Severity: normal

Found in version 28.1

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55873 in the body.
You can then email your comments to 55873 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#55873; Package emacs. (Thu, 09 Jun 2022 15:05:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to urugang <urugang <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 09 Jun 2022 15:05:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: urugang <urugang <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.1; browse-url-encode-url escaped dollar symbol
Date: Thu, 09 Jun 2022 23:04:37 +0800
(browse-url
"https://www.javadoc.io/doc/com.lightbend.akka/akka-stream-alpakka-amqp_2.13/latest/akka/stream/alpakka/amqp/javadsl/AmqpSource$.html")

It opens url
"https://www.javadoc.io/doc/com.lightbend.akka/akka-stream-alpakka-amqp_2.13/latest/akka/stream/alpakka/amqp/javadsl/AmqpSource%24.html"
which escaped dollor symbol "$" to "%24".
firefox/chrome/safari all recognize dollor symbol ("$") and escaped char ("%24")
as different things.

I found browse-url-url-encode-chars replace "$" as "%24", which is not
correct.

(defun browse-url-encode-url (url)
 (browse-url-url-encode-chars url "[\"()$ ]"))
(defun browse-url-url-encode-chars (text chars)
  (replace-regexp-in-string chars
                            (lambda (s)
                              (format "%%%X" (string-to-char s)))
                            text))

So I think we should remove escape encode of dollar symbol ("$") as below.

(defun browse-url-encode-url (url)
 (browse-url-url-encode-chars url "[\"() ]"))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55873; Package emacs. (Thu, 09 Jun 2022 15:13:02 GMT) Full text and rfc822 format available.

Message #8 received at 55873 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: urugang <urugang <at> gmail.com>
Cc: 55873 <at> debbugs.gnu.org
Subject: Re: bug#55873: 28.1; browse-url-encode-url escaped dollar symbol
Date: Thu, 09 Jun 2022 17:12:09 +0200
urugang <urugang <at> gmail.com> writes:

> So I think we should remove escape encode of dollar symbol ("$") as below.
>
> (defun browse-url-encode-url (url)
>  (browse-url-url-encode-chars url "[\"() ]"))

Yup.  I've fixed this in Emacs 29 now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 55873 <at> debbugs.gnu.org and urugang <urugang <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 09 Jun 2022 15:13:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 08 Jul 2022 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 342 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.