pygobject / pgi-docgen

API Documentation Generator for PyGObject
https://lazka.github.io/pgi-docs/
GNU Lesser General Public License v2.1
128 stars 36 forks source link

Percent-escaped hash within URL fragment are not handled correctly #198

Open cl0ne opened 3 years ago

cl0ne commented 3 years ago

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.