Hello, Nick Dokos <ndo...@gmail.com> writes:
> Maybe the thing to do is to delete '=' from org-link-escape-chars and > see what problems arise. AFAICT, `url-encode-url' is subtler than that. It encodes characters whenever they are really forbidden, which is not the case of `org-link-escape'. Hence my initial question: do we need to reinvent the wheel? > But I did find that '%' was originally in org-link-escape-chars and > David Maus hardcoded it (commit 139cc1d4), so that it is *always* > escaped. I Cc David Maus in case he has time to enlighten us about his choice. > I assume there is a good reason for that, but if so, url-encode-url > might not be enough - afaict, it leaves '%' signs alone: Yes, there is a comment in url-util.el: (defconst url-host-allowed-chars ;; Allow % to avoid re-encoding %-encoded sequences. (url--allowed-chars (append '(?% ?! ?$ ?& ?' ?\( ?\) ?* ?+ ?, ?\; ?=) url-unreserved-chars)) "Allowed-character byte mask for the host segment of a URI. These characters are specified in RFC 3986, Appendix A.") Not sure how it could affect URI correctness. I trust "url-util.el" authors, though. Regards, -- Nicolas Goaziou