View Single Post
Old 02-11-2015, 08:03 AM   #1
iliakan
Member
iliakan began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jan 2015
Device: iphone 6
Allow / inside fragment identifier

From http://tools.ietf.org/html/rfc3986:
Quote:
The characters slash ("/") and question mark ("?") are allowed to
represent data within the fragment identifier.
Ebook conversion filters fragment identifiers in a too harsh way: https://github.com/kovidgoyal/calibr...t.py#L350-L359

Code:
 frag_pat = re.compile(r'[-A-Za-z0-9_:.]+$')

I'd suggest to add / and maybe ? to the list, because the standard explicitly allows that.

The issue breaks conversion for certains HTMLs.
iliakan is offline   Reply With Quote