Fix phising bug

This commit is contained in:
KMY 2023-03-07 12:11:54 +09:00
parent 1f52db67aa
commit a5c3cb4b42

View file

@ -64,7 +64,7 @@ class Sanitize
:relative
end
if LINK_PROTOCOLS.include?(scheme) && href != text
if LINK_PROTOCOLS.include?(scheme) && href != text && href != 'https://' + text && cls == ''
current_node['class'] = cls + ' kmy-dangerous-link'
current_node.before(Nokogiri::XML::Text.new('⚠', current_node.document))
end