diff --git a/lib/sanitize_ext/sanitize_config.rb b/lib/sanitize_ext/sanitize_config.rb index e976dbc9f4..ae5e791338 100644 --- a/lib/sanitize_ext/sanitize_config.rb +++ b/lib/sanitize_ext/sanitize_config.rb @@ -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