unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55873: 28.1; browse-url-encode-url escaped dollar symbol
@ 2022-06-09 15:04 urugang
  2022-06-09 15:12 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: urugang @ 2022-06-09 15:04 UTC (permalink / raw)
  To: 55873


(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 "[\"() ]"))





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#55873: 28.1; browse-url-encode-url escaped dollar symbol
  2022-06-09 15:04 bug#55873: 28.1; browse-url-encode-url escaped dollar symbol urugang
@ 2022-06-09 15:12 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-09 15:12 UTC (permalink / raw)
  To: urugang; +Cc: 55873

urugang <urugang@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-09 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 15:04 bug#55873: 28.1; browse-url-encode-url escaped dollar symbol urugang
2022-06-09 15:12 ` Lars Ingebrigtsen

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

	https://git.savannah.gnu.org/cgit/emacs.git

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).