emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Encoding Problem in export?


From: Nicolas Goaziou
Subject: Re: [O] Encoding Problem in export?
Date: Wed, 24 Jul 2013 13:09:05 +0200

Hello,

Nick Dokos <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]