# HG changeset patch # User Kim Alvefur # Date 1544707937 -3600 # Node ID 6444fb5dbb510eb5ede02d3726056a4a10d600cf # Parent 823027110e2912a86862273944dbc7670a02c072 mod_xhtmlim: Turn unknown elements into In HTML, you're supposed to replace unknown tags with their content. The :maptags API can't replace tags with text, but replacing with should close enough. diff -r 823027110e29 -r 6444fb5dbb51 mod_xhtmlim/mod_xhtmlim.lua --- 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);