07-30-2020, 05:21 AM | #211 | |
Addict
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
@thosp:
Quote:
I have corrected the error for Whatever happened to ‘relaxing over the summer? and have posted an updated version of the plugin in the first post of this thread. However, I am not sure that this will resolve the issues with the "Opening and ending tag mismatch" as the tags have not changed in the html code you posted. I have not managed to get this error when testing this plugin.... |
|
10-09-2020, 10:48 AM | #212 |
Hedge Wizard
Posts: 801
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Hi
Thanks for the plugin I am using ePubTidy a lot. I find it very, very useful. Very occasionally though I get it stopping and giving a message saying "the html is not well formed". This is in Sigil after I have run "Check if HTML is well Formed" and 'ePubCheck" and both have said there are no problems with the html. The latest item to be flagged up as being a problem is <!—?p—> A few of these code clips were created when I ran "Mend and Pretify" to tidy the code up. KevinH and Diapdealer both say the code is correct and should not not be a problem and suggested I report it here. Last edited by Thasaidon; 10-09-2020 at 10:50 AM. Reason: Typo |
Advert | |
|
10-09-2020, 10:14 PM | #213 |
Hedge Wizard
Posts: 801
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Update.
I jumped the gun a little in my previous post. The problematic string <!—?p—> is not valid. KevinH misread the dashes. |
10-10-2020, 05:11 AM | #214 |
Addict
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
@Thasaidon : Are you using the ePub3 format? The plugin is designed for the ePub2 format only. If this issue arises with an ePub2 format please would you post a snippet of the html section that produces this problem so that I can try to track it down.
|
10-10-2020, 07:46 AM | #215 | |
Hedge Wizard
Posts: 801
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
It might be best if we left it for now. I will keep an eye open for when it happens again and will document what I did before I forget it. I have altered my workflow to suit. To answer your question I ALWAYS use ePub2 format. What is betting this does not happen for a long time, now. |
|
Advert | |
|
10-10-2020, 01:54 PM | #216 |
Grand Sorcerer
Posts: 27,605
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Paste the following somewhere into a valid epub2 (and make sure it still validates after):
Code:
<!-- this is an html comment --> The default options for the plugin (first install of the plugin) are selected. Namely "Format HTML" and "Use in-built dictionary" are the only things checked on the right. Nothing changed under any of the other sections from the default. Click the Process Text button; I immediately get a Sigil warning that Incorrect XHTML/XML was detected "Are you sure you want to continue?" Choices are "Yes," "No," and "Details". Clicking the Details button shows "Incorrect XHTML: OEBPS/Text/Section0001.xhtml Line/Col 13,6 Expected '-', '[CDATA[', or 'DOCTYPE', but got '[a-zA-Z]'." If I hit "Yes" to continue, the original code posted above gets changed to: Code:
<!—this is an html comment—> Clicking "No" aborts the attempt to alter the html comment. |
10-10-2020, 10:12 PM | #217 | |
Hedge Wizard
Posts: 801
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
I often run ePubtidy several times to get rid of things as there are some things it does not get rid of in one go. I now know what to look out for. |
|
10-11-2020, 05:50 AM | #218 |
Addict
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
@Thasaidon: Thank you for notifying me about this error
@DiapDealer: Thank you for posting code that demonstrated this error. I have made a quick correction to the plugin in the first post of this thread so that comments in the form <!-- this is an html comment --> will not corrupt the ePub. I will need to update the error reporting facility at a later date as each piece of commented code will cause the following errors to be reported: Replaced a series of short/long hyphens with one long hyphen 2 Replaced <space><long hypen><space> with one long hyphen 2 |
10-16-2020, 01:12 AM | #219 | |
Hedge Wizard
Posts: 801
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
New Buglet?
Hi Calibuser
The bad penny has turned up again. I was running ePubTidy and got the message Quote:
<p><br/></p> The line number in the message was two lines away from the actual problem. The line <p class="ptextctr"><br/></p> does not cause the message to pop up. The well formed html check and ePubcheck pass both of the above strings with no problems. |
|
10-16-2020, 07:29 AM | #220 |
Addict
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
@Thasaidon I put <p><br/></p> into an otherwise empty Sigil ePub and ran the ePubTidy plugin but I did not get any error messages. The plugin inserted into the line as expected to obtain:
<p> <br/></p> is inserted to ensure that this gives a blank line in Sony readers. Perhaps another part of your epub is the source of this error? Please try running the plugin on a Sigil ePub that contains only the line <p><br/></p> to check whether this still causes the issue. |
10-16-2020, 08:47 AM | #221 | |
Hedge Wizard
Posts: 801
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
I then ran Mend and Pretify followed by ePubtody. It worked but inserted no breakibg spaces into the lines. I removed the no breaking spaces and ran ePubtidy and it worked again. I then exited Sigil without saving. I will send you a copy of the ePub to play with. This needs more than I can give it |
|
10-16-2020, 11:20 AM | #222 |
Sigil Developer
Posts: 7,735
Karma: 5446592
Join Date: Nov 2009
Device: many
|
I took a peek at your problem epub. The issue is not with the plugin. The issue is that your xhtml file is missing the proper DOCTYPE header which provides the DTD info that defines named entities.
Without that DOCTYPE there are no named entities of any kind defined anyplace (except for the basic xml named entities for <, >, &, etc. This made the named entity & n b s p ; (skip the added spaces) undefined and therefore an error under epub2. With the proper DOCTYPE then adding a nbsp is just fine. (Aside: Under epub3, there is a different DOCTYPE required and no named entities are defined at all meaning only numeric entities are allowed.) So by simply editing your file (or Mending it with Sigil) and adding the following DOCTYPE info immediately after the xml declaration header, everything should be just fine: Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> Code:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> |
10-16-2020, 09:11 PM | #223 |
Hedge Wizard
Posts: 801
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Thank you Kevin.
Another thing learned. A day without learning something is a day wasted. (most times) I will look for that in future. |
10-17-2020, 04:55 AM | #224 |
Addict
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
@Kevin: Thanks for spotting the error in the heading - I did not notice that as the cause of the issue.
|
11-20-2020, 12:41 PM | #225 |
Member
Posts: 11
Karma: 10
Join Date: Dec 2014
Device: laptop & tablet
|
Quote within a quote mishandling?
In a blank Sigil epub file I pasted a text code file that included --
SOURCE <p>"You’d go nuts," Blake commented. "It’d be nice, sitting around like that with nothing to do, but after two weeks, you’d go off your rocker. Thomas Wolfe, I think it was, said ‘You can’t go home again.’"</p> And got this -- RESULT <p>"You’d go nuts," Blake commented. "It’d be nice, sitting around like that with nothing to do, but after two weeks, you’d go off your rocker. Thomas Wolfe, I think it was, said ‘You can’t go home again.’</p> <p>"</p> This also happens when the quote within a quote is at the beginning of the paragraph. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tidying Up My Kindle | selectortone | Calibre | 2 | 07-17-2013 10:35 AM |
developping a Plugin for Presentation files | abdlink | Plugins | 4 | 04-15-2013 11:27 AM |
Plugin to fix fb2 files | oviksna | Plugins | 3 | 01-28-2013 08:53 AM |
Tidying Up My Library | JayLaFunk | Library Management | 2 | 09-20-2011 09:12 AM |
Calibre 0.7.50 can't see plugin files | mb_webguy | Calibre | 5 | 04-29-2011 03:41 AM |