Skip to content

Tofu in xi:include fixups, block/warning against functional xi:fallback - #332

Open
alfsb wants to merge 1 commit into
php:masterfrom
alfsb:xifallback
Open

Tofu in xi:include fixups, block/warning against functional xi:fallback#332
alfsb wants to merge 1 commit into
php:masterfrom
alfsb:xifallback

Conversation

@alfsb

@alfsb alfsb commented Jul 27, 2026

Copy link
Copy Markdown
Member

Add tofu (U+FFFD � REPLACEMENT CHARACTER) in empty elements to avoid trip PhD into generating invalid HTML, also block (on doc-en) and warning (in translations) in the presence of reachable functional <xi:fallback>s, that cause manual parts to go silently missing.

Comments and reviews are welcome. Plan to merge this after manual split.

@alfsb

alfsb commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

The tofu thing is a workaround to the long standing php/phd#247 and php/phd#181 .

@alfsb alfsb mentioned this pull request Jul 27, 2026
47 tasks
@jordikroon

jordikroon commented Jul 29, 2026

Copy link
Copy Markdown
Member

Please use &#xFFFD; instead. It trips me over a little, and it's a special unicode character. Just like how &amp; is preferred usually.

This character is also not consistently rendered across browsers and/or operating systems, but for this purpose that's not a problem.

@alfsb

alfsb commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

One alternative over tofu is to repeat the $alert in each inline element. Even more so now that it is "reduced", after I pushed the failed xpointer body into XML comment, that probably will not render.

That said, I prefer a single character that is not consistently rendered across browsers, than having random pages being consistently rendered wrong across browsers.

But the comment thing worries me. It will take a long time until I borrow a machine to test the PhD side, to see if this change in fact fixes both issues, and does not cause one immediate breakage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants