View Single Post
Old 04-20-2012, 09:08 AM   #3
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718479
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
Quote:
Originally Posted by MikeMJ View Post
I am trying to...
"_Toc...

the heading has been changed to:
"<i>Toc...

Can anybody tell me why some of the HTML tags are being corrupted? Also, why is the text:

"<i>

being inserted before the text of the anchor name attribute?
Quite obviously, the underscore preceding the "Toc" is giving calibre grief. Calibre seems to be incorrectly interpreting it as the antique (still frequently seen) use of underscores wrapping a portion of text to indicate italics. Calibre is replacing the underscore with the <i> tag. Later processing is then converting the < to &lt and > to &gt.

One fix is to sweep the document with S&R to remove the underscore (e.g. replace "_Toc" with "Toc") before conversion.
dwig is offline   Reply With Quote