about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-07-19 20:15:03 +0200
committerThibaut Girka <thib@sitedethib.com>2019-07-19 20:15:03 +0200
commit86d446194823a416a99c5b4657f4684fb0e07ae9 (patch)
tree493f5163933a9378aaeb0c4e4fdfaacd3e16aa46 /app
parent3407ae8683b36fd3514aa518b5b1634d0e88d0c7 (diff)
Fix HTML entities being encoded as hashtag links…
Diffstat (limited to 'app')
-rw-r--r--app/lib/formatter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb
index 113b5c4a0..85bc8eb1f 100644
--- a/app/lib/formatter.rb
+++ b/app/lib/formatter.rb
@@ -314,7 +314,7 @@ class Formatter
     gaps = []
     total_offset = 0
 
-    escaped = html.gsub(/<[^>]*>/) do |match|
+    escaped = html.gsub(/<[^>]*>|&#[0-9]+;/) do |match|
       total_offset += match.length - 1
       end_offset = Regexp.last_match.end(0)
       gaps << [end_offset - total_offset, total_offset]