mod_xhtmlim: Fix scheme check (thanks wiktor)
authorKim Alvefur <zash@zash.se>
Tue, 30 Jan 2018 20:04:55 +0100
changeset 2870 276f7af8afd1
parent 2869 f6ed4421167d
child 2871 94d8960385aa
mod_xhtmlim: Fix scheme check (thanks wiktor)
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