Character Style "Include Classes in HTML" checkbox removes whole tag
The "Include Classes in HTML" checkbox doesn't work for Character Styles. Whereas paragraph styles and object style export without the class, character styles actually export without the tag at all—losing any formatting for that style. This is the case both in HTML and EPUB export.
-
Jonas commented
This bug is still present in Indesign 16.1, more than three years after it was first reported ...
-
Anonymous commented
This obvious bug should have been fixed by now.
-
T. Wasser commented
I can confirm this pub is still present in InDesign CC 2019 (14.0.2), and I've already wasted a number of hours because of it (searching for the character style in InDesign, finding that section in the ePub, and manually adding the incorrectly-removed <em></em> tags.)
You can also confirm the bug without having to export—for example (see attached screenshots):
1. Add a character style.
2. Confirm in "Edit All Export Tags" that by default, this character style is set to be included in the HTML and to emit CSS.
3. Open the character style options, then export tagging. Under Tag, select <em>, and uncheck "Include Classes in HTML". The export details now correctly show use of the <em> tag, but incorrectly show an em class, to be added to that <em> tag. According to the Export Details, we should receive code like the following:
>>> 'Twas <em class="em">brillig,</em> and the <em class="em">slithy toves</em>
Which is incorrect, but still usable. Instead, what we receive is:
>>> 'Twas brillig, and the slithy toves
Which reflects neither the options we chose, nor what the Character Style panel suggests that it will output. What is actually desired in this situation is:
>>> 'Twas <em>brillig,</em> and the <em>slithy toves</em>
4. At this point, if you check "Edit All Export Tags", you'll see that the option "Include in HTML" has been unchecked, and the option actually modified in the Character Style Options ("Include Classes in HTML") does not appear at all in the window.
So it sounds like the separate "Include Classes in HTML" and "Include in HTML" options have been conflated somewhere behind-the-scenes, and in addition there seems be be an issue with the display of export details.
As a good deal of work is already required to clean up InDesign's exported ePub into a usable ePub when InDesign is working as-designed, this bug is incredibly frustrating—and should you not notice the missing tags until you've otherwise processed the ePub, fixing it can be mind-numbingly dull and rather time-consuming.
Thanks.
-
Alexis commented
I agree. I have found that the HTML exporting should be more specific, such as keep tags, but do not include classes.
-
Evan commented
Yes this was driving me crazy thinking I was doing something wrong. This a bug specific to CHARACTER styles as you said (the equivalent export settings for paragraph styles work properly).
TO REPRODUCE:
Create new document
type some text
create a new character style, for example “Italics”
In the character style’s Export Tagging settings, choose:
> Tag: em
> UNCHECK “Include Classes in HTML”Now apply that character style to any word in your text.
File >> Export >> HTML
[specific settings here don’t matter, just click ok]What should happen:
HTML should export with your chosen word wrapped in a basic <em></em> tag, with no classWhat actually happens:
HTML exports with NO tag wrapping the chosen word at all. The tag is completely ignored.The only way to get the character style’s tag to successfully export is to check “include classes in HTML”. But this is not desirable when we do not want/need any classes, such as for simple <em> or <strong> tags.
Would appreciate if you could fix as this would really clean up our HTML markup.