pgi-docgen icon indicating copy to clipboard operation
pgi-docgen copied to clipboard

Percent-escaped hash within URL fragment are not handled correctly

Open cl0ne opened this issue 4 years ago • 0 comments

Linking to a specific part of a documentation page with sidebar open uses an unescaped # within the URL fragment (to specify a fragment part for URL to be loaded within reference's content frame). That works perfectly fine due to forgiving nature of web browsers, but these URLs doesn't conform to RFC 3986. According to RFC, any other # within the fragment part have to be percent-encoded (see also relevant SO answer). Current implementation cannot load RFC-compliant URLs and will give 404.

For example: https://lazka.github.io/pgi-docs/index.html#Gtk-3.0/functions.html%23Gtk.main should be load the same page as https://lazka.github.io/pgi-docs/index.html#Gtk-3.0/functions.html#Gtk.main.

cl0ne avatar Dec 23 '20 00:12 cl0ne