changeset 2866:276f7af8afd1

mod_xhtmlim: Fix scheme check (thanks wiktor)
author Kim Alvefur <zash@zash.se>
date Tue, 30 Jan 2018 20:04:55 +0100
parents f6ed4421167d
children 94d8960385aa
files mod_xhtmlim/mod_xhtmlim.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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