Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
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
Old 02-11-2015, 08:12 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,199
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That section is there to workaround limitations in Adobe Digital Editions, which tends to fall over and die with fragment identifiers that contain characters other than those in the regex, as is noted in the comment.

Not to mention that the cleanup is performed for fragment identifiers in the NCX ToC, for which the HTML spec is irrelevant.
kovidgoyal is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fragment Identifier missing, but looks OK flypig ePub 8 12-19-2018 06:58 PM
IMG inside SVG inside TD? Kasper Hviid Sigil 4 05-25-2014 06:57 AM
Fragment Identifier Not Defined lwa Sigil 6 07-10-2013 05:00 PM
Fragment identifier styline on Nook marciarampart ePub 3 11-21-2011 02:53 PM
Verifying Document/Fragment Identifier Schlutek ePub 6 09-09-2011 01:22 PM


All times are GMT -4. The time now is 04:25 AM.


MobileRead.com is a privately owned, operated and funded community.