![]() |
Possible to escape characters in CSS tags in Sigil?
google found for me the possibility of using backslash escape character in CSS, but Sigil v 4.2 is throwing "not well-formed document" error. (on XP SP3 if that affects things)
Specifically, I'm using <h3> tags for chapter headings. I want to enter text in titles that will be picked up by the TOC generator. Some have a double-quote, and Calibre reader TOC cannot parse the unicode curly quotes - it displays black boxes. So I want to use straight quote marks. Here's an example of what I'm trying to do: Code:
<h3 title="IV. He shouts "NO" loudly" id="ch04">IV</h3>If I try to use straight quotes (alone or with backslash) I get "whitespace expected" error. Is there such a thing as an escape character in epub tags, or is that wishful thinking? |
Use the " entity
This should work:
Code:
<h3 id="ch04" title="IV. He shouts "NO" loudly">IV</h3> |
Quote:
|
You can also type it like this:
Code:
<h3 title='IV. He shouts "NO" loudly' id="ch04">IV</h3> |
Quote:
|
Quote:
|
Apologies for very belated thanks!
I knew you guys would have answers for me. I'm using the entity as suggested by Doitsu, working great. Timur, your solution works well for me if quotes are not mixed, but if I have double and single quotes in the text string, can't get it to work out. Many thanks to all who responded! |
Yes, you have to use entity representations, either " or ', if attribute value contains both string delimiter characters.
From Extensible Markup Language (XML) 1.0 (Fifth Edition): Quote:
|
| All times are GMT -4. The time now is 07:54 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.