diff options
author | Hinaloe <hina@hinaloe.net> | 2019-02-09 11:39:38 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-02-09 03:39:38 +0100 |
commit | 157d3af46c1a94dd0365b6e33e82919dd3c15fde (patch) | |
tree | dc92eed860fe875d3469ddf68881e372e23b2987 /spec/lib | |
parent | d09ce6d81b542705fcce8f5091d032471531c755 (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 'spec/lib')
-rw-r--r-- | spec/lib/formatter_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/formatter_spec.rb b/spec/lib/formatter_spec.rb index 9872d3756..8fb6695a9 100644 --- a/spec/lib/formatter_spec.rb +++ b/spec/lib/formatter_spec.rb @@ -194,6 +194,14 @@ RSpec.describe Formatter do is_expected.to include '/tags/hashtag" class="mention hashtag" rel="tag">#<span>hashtag</span></a>' end end + + context 'given text containing a hashtag with Unicode chars' do + let(:text) { '#hashtagタグ' } + + it 'creates a hashtag link' do + is_expected.to include '/tags/hashtag%E3%82%BF%E3%82%B0" class="mention hashtag" rel="tag">#<span>hashtagタグ</span></a>' + end + end end describe '#format_spoiler' do |