Page MenuHomePhabricator

Wikisource Export: HTML entities like "&" rendered as "&" in ebook titles
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

Ampersands in book titles get rendered as &.

This bug was found by @Inductiveload in T270373#6698717.

Books to reproduce problem
Environment

Reproducible on wsexport production (commit 09565886c7f47e4dbbd1371d8935ab7882bb8382 16th Nov 2020)

Screenshots (if applicable):

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptDec 18 2020, 2:56 PM

Also " and other HTML entities.

Aklapper renamed this task from Wikisource Export: "&" rendered as "&" in ebook titles to Wikisource Export: HTML entities like "&" rendered as "&" in ebook titles.Dec 22 2020, 1:07 PM

It seems that this is due to the way we sanitize the book & chapters' titles when generating the links. Possibly at https://github.com/wsexport/tool/blob/main/src/Cleaner/BookCleanerEpub.php#L166 ?

&, ' and " now appear correctly on the title page.

This change appears to be on production.

Test environment: wsexport-test version 2.2.1-8-g9335af8.

ifried added a subscriber: ifried.

As I have also seen in my tests, &, ' and " now appear correctly on the title page. I'm marking this as Done.