mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-29 12:03:57 +00:00
Fix HTML entities being encoded as hashtag links…
This commit is contained in:
parent
3407ae8683
commit
86d4461948
|
@ -314,7 +314,7 @@ class Formatter
|
||||||
gaps = []
|
gaps = []
|
||||||
total_offset = 0
|
total_offset = 0
|
||||||
|
|
||||||
escaped = html.gsub(/<[^>]*>/) do |match|
|
escaped = html.gsub(/<[^>]*>|&#[0-9]+;/) do |match|
|
||||||
total_offset += match.length - 1
|
total_offset += match.length - 1
|
||||||
end_offset = Regexp.last_match.end(0)
|
end_offset = Regexp.last_match.end(0)
|
||||||
gaps << [end_offset - total_offset, total_offset]
|
gaps << [end_offset - total_offset, total_offset]
|
||||||
|
|
Loading…
Reference in a new issue