Opened 3 weeks ago

Closed 3 weeks ago

#37204 closed Bug (fixed)

Building the epub version of the docs results in an invalid epub with errors on pages with console directives

Reported by: Natalia Bidart Owned by: Natalia Bidart
Component: Documentation Version: 6.0
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Natalia Bidart)

While working on #37138, I tested the epub build and it generates an epub file where the pages including console directives show unexpected content.

For example, in an online epub reader (https://epub-reader.online/):

XML Parsing Error: not well-formed Location: https://epub-reader.online/# Line Number 31, Column 82:<input class="c-tab-unix" id="c-tab-0-unix" type="radio" name="console-0" checked> ---------------------------------------------------------------------------------^

Locally with calibre the two OS radio buttons are shown as shown in this attached image:

Attachments (1)

image-20260705-195656.png (105.1 KB ) - added by Natalia Bidart 3 weeks ago.

Download all attachments as: .zip

Change History (6)

by Natalia Bidart, 3 weeks ago

Attachment: image-20260705-195656.png added

comment:1 by Natalia Bidart, 3 weeks ago

Description: modified (diff)

comment:2 by Natalia Bidart, 3 weeks ago

Description: modified (diff)

comment:3 by Sarah Boyce, 3 weeks ago

Triage Stage: UnreviewedAccepted

comment:4 by Sarah Boyce, 3 weeks ago

Triage Stage: AcceptedReady for checkin

comment:5 by Sarah Boyce <42296566+sarahboyce@…>, 3 weeks ago

Resolution: fixed
Status: assignedclosed

In c087b7e8:

Fixed #37204 -- Rendered console directives as plain code in epub docs builds.

The console directive renders its Unix/Windows tabs with browser-only
markup: hidden radio inputs toggled via CSS. The epub builder shares the
HTML format, so it copied that markup into the ebook, where the tabs
cannot work (e-readers do not support the driving CSS) and the raw HTML
is not well-formed XHTML, so strict readers fail to parse the page.

Skipped the tab markup for the epub builder and fell back to a plain
literal block, matching what the non-HTML builders already do.

Note: See TracTickets for help on using tickets.
Back to Top