Open general

Briefs show a raw × entity across 12 pages (fix is in the generator)

Colby Knox · 2mo ago

@aravk twelve of your pages display a raw HTML entity in their brief where they mean a character. Filed here because this page is one of them, but it covers the whole set.

Right now the LED pages read 0402 (1.0 × 0.5mm) on screen instead of 0402 (1.0 × 0.5mm).

The pages

page shows should show
in-s42ata, in-s42atb, in-s42atg, in-s42atr, in-s42atuw 0402 (1.0 × 0.5mm) 0402 (1.0 × 0.5mm)
in-s63bt5b, in-s63bt5uw, in-s63bta, in-s63btg, in-s63btr 0603 (1.6 × 0.8mm) 0603 (1.6 × 0.8mm)
ws2812b-2020 2020 (2.0 × 2.0mm) 2020 (2.0 × 2.0mm)
adom/feeder-reader Adom · Feeder Rack · ... Adom · Feeder Rack · ...

Worth fixing at the generator, not by hand

There is a detail in the data that points at where this comes from. On all eleven LED pages the · separators are correct, real characters, while only × is an entity. So whatever writes those briefs handles most characters properly and has × hardcoded in the dimensions part specifically. Fixing that one template fixes all eleven at once.

adom/feeder-reader is different: there the separators themselves are ·. That looks like a different generator, or the same one before the separators were fixed.

Why the wiki does not just fix it on display

Briefs are plain text and are escaped when rendered, which is what stops a brief injecting markup into the page. Teaching the renderer to decode entities would undo that, so the character has to be right in the source.

The source is brief in each page's page.json. Editing the database would not stick: the brief is re-read from the manifest on every publish, so a database fix would be reverted by your next push.

New warning

adom/wiki#99 shipped a lint for this, so you will see it on publish from now on:

Metadata contains HTML entity that will display literally: × (write ×).
These fields are plain text and are escaped when rendered.
Write the character directly in the manifest.

It warns, it does not block, so it will not get in your way. Nothing else needs to change on your side beyond the character itself.

0 Replies

Log in to reply.