Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-10-2019, 07:54 AM   #1
ajki
Junior Member
ajki began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2019
Device: Kobo Aura HD, Pocketbook InkPad 3 (PB740)
4.5: Parsing failed: EntityRef: expecting ';'

Calibre 4.5, epub, check for errors within epub:

a link is given as in: ... <a href="https://www.xxx.yy/index.php?eID=dumpFile&t=f&f=4182....">...</a>...

note the ampersands in the link

When checking for errors within (the whole) ebook Calibre 4.5 breaks with an error message: "Parsing failed: EntityRef: expecting ';', line xxx, column yyyy..."

Within the editor (edit area and simplified view area) the link itself opens correctly an external browser with the specified page (a pdf in this case). URL encoding (like %26 instead of ampersand) will not display the website.

I think there is something wrong with the regex check within urls
ajki is offline   Reply With Quote
Old 12-10-2019, 09: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: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Standalone ampersands are not valid in HTML. You need to use &amp;
kovidgoyal is offline   Reply With Quote
Old 12-10-2019, 11:13 AM   #3
ajki
Junior Member
ajki began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2019
Device: Kobo Aura HD, Pocketbook InkPad 3 (PB740)
*WITHIN* a link? I don't think so....

(and, as implied above, what will a Server answer if it gets "https://..../whatever&amp;whatever..."?)
ajki is offline   Reply With Quote
Old 12-10-2019, 11:27 AM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,393
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by ajki View Post
*WITHIN* a link? I don't think so....

(and, as implied above, what will a Server answer if it gets "https://..../whatever&amp;whatever..."?)
It will treat the &amp; as a &. And yes, you can use entities in a link. And we are not discussing web links here. You are looking at a link internal to an ebook file which is not governed by the same rules.

I modified the link to this message and Firefox, Chrome and Edge Dev open this link happily:

Code:
https://www.mobileread.com/forums/showpost.php?p=3926556&amp;postcount=4

Last edited by DNSB; 12-10-2019 at 11:33 AM.
DNSB is offline   Reply With Quote
Old 12-10-2019, 12:43 PM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Or you could url encode your url, as opposed to xml escaping and the & will happily get % encoded.
KevinH is offline   Reply With Quote
Old 12-10-2019, 01:38 PM   #6
ajki
Junior Member
ajki began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2019
Device: Kobo Aura HD, Pocketbook InkPad 3 (PB740)
You (all) are right, I was wrong. Masking with &amp; or %26 actually works without problems - starting the browser from the link within the *preview window* (or from the resulting ebook). My error was Ctrl-clicking on the href-url within the *edit window" (when masking with &amp; or %26. That way the url is given as is within the edit window and the server won't find the page.
ajki is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parsing Failed: Namespace Prefix pub for type on nav is not defined hank3rd Editor 5 03-12-2018 06:30 PM
ebook reader: blob error expecting text rutmang Calibre 8 08-26-2017 08:52 AM
Edit book/Check book/Parsing failed: Inconsistencies in counting chaot Editor 4 06-02-2016 11:20 AM
Random "HTML 5 parsing failed" issproevolution Recipes 4 01-23-2014 03:33 AM
Am I expecting too much too soon? cozworth Reading and Management 14 11-12-2007 12:39 PM


All times are GMT -4. The time now is 08:06 PM.


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