about summary refs log tree commit diff
path: root/app/lib/formatter.rb
diff options
context:
space:
mode:
authorHinaloe <hina@hinaloe.net>2019-02-09 11:39:38 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-02-09 03:39:38 +0100
commit157d3af46c1a94dd0365b6e33e82919dd3c15fde (patch)
treedc92eed860fe875d3469ddf68881e372e23b2987 /app/lib/formatter.rb
parentd09ce6d81b542705fcce8f5091d032471531c755 (diff)
Only URLs extract with pre-escaped text (#9991)
* [test] add japanese hashtag testcase

* Only URLs extract with pre-escaped text

( https://github.com/tootsuite/mastodon/issues/9989 )
Diffstat (limited to 'app/lib/formatter.rb')
-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 2e3587169..6603b8df1 100644
--- a/app/lib/formatter.rb
+++ b/app/lib/formatter.rb
@@ -210,7 +210,7 @@ class Formatter
 
     # Note: I couldn't obtain list_slug with @user/list-name format
     # for mention so this requires additional check
-    special = Extractor.extract_entities_with_indices(escaped, options).map do |extract|
+    special = Extractor.extract_urls_with_indices(escaped, options).map do |extract|
       # exactly one of :url, :hashtag, :screen_name, :cashtag keys is present
       key = (extract.keys & [:url, :hashtag, :screen_name, :cashtag]).first