bug-texinfo
[Top][All Lists]
Advanced

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

Re: url protection


From: Gavin Smith
Subject: Re: url protection
Date: Fri, 5 Aug 2022 18:35:42 +0100

On Wed, Aug 03, 2022 at 03:26:08PM +0200, Patrice Dumas wrote:
> Hello,
> 
> In general, hrefs generated by texi2any to Texinfo manuals, be it the
> current manual or external manual, only contain ascii characters
> acceptable in hrefs.  However, for some other href, for <img> file
> names, or from @url{}, there could be any characters.
> 
> I think that it would be cleaner to percent encode those hrefs.  I tries
> to read the URL specification, https://url.spec.whatwg.org/, but I could
> not understand much, and there is no exposition at all, only pseudo
> code.
> 
> My proposal would be to follow the perl faq,
> https://perldoc.perl.org/perlfaq9#How-do-I-decode-or-create-those-%25-encodings-on-the-web?
> To encode a string yourself, use the URI::Escape module. The uri_escape 
> function returns the escaped string
> 
> This would add the URI::Escape module as dependency.  This is a rather
> common module, but it does not seems to be in perl core.  To me
> documenting that the module is needed should be enough.

Could we write or copy the code for escaping a URL as it should
be very short and simple?  This would avoid an extra module dependency.



reply via email to

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