Page MenuHomePhabricator

CSS escaped to HTML entities, not CSS entities
Closed, ResolvedPublic

Description

The Wikisource template https://en.wikisource.org/wiki/Template:Flatlist uses the following CSS (via TemplateStyles https://en.wikisource.org/wiki/Template:Flatlist/styles.css)

.__hlist li:after {
	content: " \00B7 ";
}

However in the EPUB, it comes out as:

.__hlist li:after {
	content: " · ";
}

This is no longer a valid CSS entity, it is now an HTML entity. This breaks some e-reader displays, like Koreader, which shows a literal ·

CSS entities: https://www.w3schools.com/cssref/css_entities.asp

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Samwilson @dmaza Do you think this is another Parsoid-related ticket?

Update: not parsoid-related, most likely

I've had a go at this as well: https://github.com/wikimedia/ws-export/pull/479

I've been testing random books (with the app:check command, and on my Kobo) and haven't found any issues reported by epubcheck 5.1 (although there are of course some things that it doesn't catch).

This is fixed now, with the above patch merged.

Old:

.wst-flatlist li:after{content:" ·";font-weight:bold}

New:

.wst-flatlist li:after{content:" ·";font-weight:bold}
Samwilson claimed this task.