about summary refs log tree commit diff
path: root/lib/sanitize_ext
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2022-04-26 10:41:24 -0500
committerStarfall <us@starfall.systems>2022-04-26 10:41:24 -0500
commitfd98fd86128a5cea302b8496b6c7d5464ec1958a (patch)
treef3e304a32bed75cb8ab6b1f38652192bff71c5f1 /lib/sanitize_ext
parent8da73d2e57284c765b232bfc6842a7ac0f0a702b (diff)
parenta481af15a9b2a7829c2a849906aa4b475ccdbd98 (diff)
Merge remote-tracking branch 'glitch/main'
Diffstat (limited to 'lib/sanitize_ext')
-rw-r--r--lib/sanitize_ext/sanitize_config.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sanitize_ext/sanitize_config.rb b/lib/sanitize_ext/sanitize_config.rb
index c02de967b..27e1eb92f 100644
--- a/lib/sanitize_ext/sanitize_config.rb
+++ b/lib/sanitize_ext/sanitize_config.rb
@@ -134,7 +134,7 @@ class Sanitize
       rel += ['nofollow', 'noopener', 'noreferrer'] unless TagManager.instance.local_url?(node['href'])
 
       if rel.empty?
-        node['rel']&.delete
+        node.remove_attribute('rel')
       else
         node['rel'] = rel.join(' ')
       end
@@ -145,7 +145,7 @@ class Sanitize
 
       node = env[:node]
       if node['target'] != '_blank' && TagManager.instance.local_url?(node['href'])
-        node['target']&.delete
+        node.remove_attribute('target')
       else
         node['target'] = '_blank'
       end