about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-20 23:25:40 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-20 23:26:01 -0500
commit1cf4d5a83dcc9a1b3d1bb556b40acf2828ee1241 (patch)
tree071d33ddda1f01be5272c71f8945c2382a1fe227 /app/lib
parentc4600411f73138489e3c3870de1693a297f4fe46 (diff)
make anchor tagger strip trailing punctuation from link text before matching
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/sanitize_config.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/sanitize_config.rb b/app/lib/sanitize_config.rb
index 697d88fd3..e7b70f078 100644
--- a/app/lib/sanitize_config.rb
+++ b/app/lib/sanitize_config.rb
@@ -74,8 +74,8 @@ class Sanitize
         return
       end
 
-      # strip trailing slashes
-      text.sub!(/\/+\Z/, '')
+      # strip trailing punctuation
+      text.sub!(/\p{Punct}+\Z/, '')
 
       # href starts with link text?
       return if href.start_with?(text)