about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorStarfall <admin@plural.cafe>2020-05-31 12:56:29 -0500
committerStarfall <admin@plural.cafe>2020-05-31 12:56:29 -0500
commit76f79dd29909d39f1d36ef48e6892223d59e29d7 (patch)
tree8a5ace5fea5cf8a4c6f1c55e01db99a289c4b1e3 /app/lib
parent0167552bed46508efeed266853a1ee4437e12998 (diff)
parentddcd9fe9f0e85b1db12ae584749e680146611f9a (diff)
Merge branch 'glitch'
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/sanitize_config.rb2
-rw-r--r--app/lib/tag_manager.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/app/lib/sanitize_config.rb b/app/lib/sanitize_config.rb
index e63f290a3..8d094dddb 100644
--- a/app/lib/sanitize_config.rb
+++ b/app/lib/sanitize_config.rb
@@ -56,7 +56,7 @@ class Sanitize
     end
 
     LINK_REL_TRANSFORMER = lambda do |env|
-      return unless env[:node_name] == 'a'
+      return unless env[:node_name] == 'a' and env[:node]['href']
 
       node = env[:node]
 
diff --git a/app/lib/tag_manager.rb b/app/lib/tag_manager.rb
index d06bea059..29dde128c 100644
--- a/app/lib/tag_manager.rb
+++ b/app/lib/tag_manager.rb
@@ -32,6 +32,7 @@ class TagManager
 
   def local_url?(url)
     uri    = Addressable::URI.parse(url).normalize
+    return false unless uri.host
     domain = uri.host + (uri.port ? ":#{uri.port}" : '')
 
     TagManager.instance.web_domain?(domain)