mod_xhtmlim: Turn unknown elements into <span>
In HTML, you're supposed to replace unknown tags with their content. The
:maptags API can't replace tags with text, but replacing with <span>
should close enough.
--- a/mod_xhtmlim/mod_xhtmlim.lua Thu Dec 13 10:35:26 2018 +0000
+++ b/mod_xhtmlim/mod_xhtmlim.lua Thu Dec 13 14:32:17 2018 +0100
@@ -87,8 +87,8 @@
end
end
else
- -- Can't happen with the above assert.
- return nil;
+ tag.name = "span"
+ tag.attr = { xmlns = "http://www.w3.org/1999/xhtml" }
end
-- Check child tags
tag:maptags(sanitize_xhtml);