[Django] #37204: Building the epub version of the docs results in an invalid epub with errors on pages with console directives

0 views
Skip to first unread message

Django

unread,
Jul 5, 2026, 6:56:46 PM (11 hours ago) Jul 5
to django-...@googlegroups.com
#37204: Building the epub version of the docs results in an invalid epub with
errors on pages with console directives
------------------------------------------+--------------------------------
Reporter: Natalia Bidart | Owner: Natalia Bidart
Type: Bug | Status: assigned
Component: Documentation | Version: 6.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+--------------------------------
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 calibe the two OS radio buttons are shown as shown in an
attached image.
--
Ticket URL: <https://code.djangoproject.com/ticket/37204>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 5, 2026, 6:57:02 PM (11 hours ago) Jul 5
to django-...@googlegroups.com
#37204: Building the epub version of the docs results in an invalid epub with
errors on pages with console directives
--------------------------------+------------------------------------------
Reporter: Natalia Bidart | Owner: Natalia Bidart
Type: Bug | Status: assigned
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------
Changes (by Natalia Bidart):

* Attachment "image-20260705-195656.png" added.

Django

unread,
Jul 5, 2026, 6:58:56 PM (11 hours ago) Jul 5
to django-...@googlegroups.com
#37204: Building the epub version of the docs results in an invalid epub with
errors on pages with console directives
--------------------------------+------------------------------------------
Reporter: Natalia Bidart | Owner: Natalia Bidart
Type: Bug | Status: assigned
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------
Description changed by Natalia Bidart:

Old description:

> 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 calibe the two OS radio buttons are shown as shown in an
> attached image.

New description:

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 calibe the two OS radio buttons are shown as shown in this
attached image:
[[Image(ticket:37204:image-20260705-195656.png​)]]

--
--
Ticket URL: <https://code.djangoproject.com/ticket/37204#comment:1>

Django

unread,
Jul 5, 2026, 7:58:50 PM (10 hours ago) Jul 5
to django-...@googlegroups.com
#37204: Building the epub version of the docs results in an invalid epub with
errors on pages with console directives
--------------------------------+------------------------------------------
Reporter: Natalia Bidart | Owner: Natalia Bidart
Type: Bug | Status: assigned
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------
Description changed by Natalia Bidart:

Old description:

> 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 calibe the two OS radio buttons are shown as shown in this
> attached image:
> [[Image(ticket:37204:image-20260705-195656.png​)]]

New description:

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:
[[Image(ticket:37204:image-20260705-195656.png​)]]

--
--
Ticket URL: <https://code.djangoproject.com/ticket/37204#comment:2>

Django

unread,
2:36 AM (3 hours ago) 2:36 AM
to django-...@googlegroups.com
#37204: Building the epub version of the docs results in an invalid epub with
errors on pages with console directives
--------------------------------+------------------------------------------
Reporter: Natalia Bidart | Owner: Natalia Bidart
Type: Bug | Status: assigned
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------
Changes (by Sarah Boyce):

* stage: Unreviewed => Accepted

--
Ticket URL: <https://code.djangoproject.com/ticket/37204#comment:3>

Django

unread,
2:41 AM (3 hours ago) 2:41 AM
to django-...@googlegroups.com
#37204: Building the epub version of the docs results in an invalid epub with
errors on pages with console directives
-------------------------------------+-------------------------------------
Reporter: Natalia Bidart | Owner: Natalia
| Bidart
Type: Bug | Status: assigned
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/37204#comment:4>

Django

unread,
2:43 AM (3 hours ago) 2:43 AM
to django-...@googlegroups.com
#37204: Building the epub version of the docs results in an invalid epub with
errors on pages with console directives
-------------------------------------+-------------------------------------
Reporter: Natalia Bidart | Owner: Natalia
| Bidart
Type: Bug | Status: closed
Component: Documentation | Version: 6.0
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce <42296566+sarahboyce@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"c087b7e8c169f009ff6113647685df4ea9fefe88" c087b7e8]:
{{{#!CommitTicketReference repository=""
revision="c087b7e8c169f009ff6113647685df4ea9fefe88"
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.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37204#comment:5>
Reply all
Reply to author
Forward
0 new messages