# HG changeset patch # User Kim Alvefur # Date 1517339095 -3600 # Node ID 276f7af8afd13189b2242d66f951d7a388a8f4f9 # Parent f6ed4421167d540bbbc5017b1185cf1e6e785dea mod_xhtmlim: Fix scheme check (thanks wiktor) diff -r f6ed4421167d -r 276f7af8afd1 mod_xhtmlim/mod_xhtmlim.lua --- a/mod_xhtmlim/mod_xhtmlim.lua Tue Jan 30 18:49:09 2018 +0100 +++ b/mod_xhtmlim/mod_xhtmlim.lua Tue Jan 30 20:04:55 2018 +0100 @@ -81,7 +81,7 @@ elseif attr == "src" or attr == "href" then local urlattr = url.parse(value); local scheme = urlattr and urlattr.scheme; - if scheme ~= "http" and scheme ~= "https" and scheme ~= "mailto" and scheme == "xmpp" and scheme ~= "cid" then + if scheme ~= "http" and scheme ~= "https" and scheme ~= "mailto" and scheme ~= "xmpp" and scheme ~= "cid" then tag.attr[attr] = "https://url.was.invalid/"; end end