diff --git a/app/assets/javascripts/pretty-text/addon/emoji/version.js b/app/assets/javascripts/pretty-text/addon/emoji/version.js index a57796bd774..5b50dd5dec7 100644 --- a/app/assets/javascripts/pretty-text/addon/emoji/version.js +++ b/app/assets/javascripts/pretty-text/addon/emoji/version.js @@ -1,4 +1,4 @@ // DO NOT EDIT THIS FILE!!! // Update it by running `rake javascript:update_constants` -export const IMAGE_VERSION = "9"; +export const IMAGE_VERSION = "10"; diff --git a/app/models/emoji.rb b/app/models/emoji.rb index f755a7eaadf..d9f8c06d19a 100644 --- a/app/models/emoji.rb +++ b/app/models/emoji.rb @@ -2,7 +2,7 @@ class Emoji # update this to clear the cache - EMOJI_VERSION = "9" + EMOJI_VERSION = "10" FITZPATRICK_SCALE ||= [ "1f3fb", "1f3fc", "1f3fd", "1f3fe", "1f3ff" ] diff --git a/plugins/poll/spec/lib/pretty_text_spec.rb b/plugins/poll/spec/lib/pretty_text_spec.rb index 52fed2284ea..5770f804f3f 100644 --- a/plugins/poll/spec/lib/pretty_text_spec.rb +++ b/plugins/poll/spec/lib/pretty_text_spec.rb @@ -165,7 +165,7 @@ describe PrettyText do MD expect(cooked).to include(<<~HTML) -
What’s your favorite berry? :wink: https://google.com/ +
What’s your favorite berry? :wink: https://google.com/
HTML end @@ -185,7 +185,7 @@ describe PrettyText do MD expect(cooked).to include(<<~HTML) -
What’s your favorite berry? :wink: https://google.com/ +
What’s your favorite berry? :wink: https://google.com/
HTML diff --git a/public/images/emoji/apple/frowning_face_with_open_mouth.png b/public/images/emoji/apple/frowning_face_with_open_mouth.png new file mode 100644 index 00000000000..e7ef74d9b3c Binary files /dev/null and b/public/images/emoji/apple/frowning_face_with_open_mouth.png differ diff --git a/spec/components/pretty_text_spec.rb b/spec/components/pretty_text_spec.rb index c2e5a611a54..cf9a2145c01 100644 --- a/spec/components/pretty_text_spec.rb +++ b/spec/components/pretty_text_spec.rb @@ -159,13 +159,13 @@ describe PrettyText do html = <<~HTML
-

This is a quote with a regular emoji :upside_down_face:

+

This is a quote with a regular emoji :upside_down_face:

-

This is a quote with an emoji shortcut :slight_smile:

+

This is a quote with an emoji shortcut :slight_smile:

-

This is a quote with a Unicode emoji :sunglasses:

+

This is a quote with a Unicode emoji :sunglasses:

HTML @@ -180,13 +180,13 @@ describe PrettyText do html = <<~HTML
-

This is a quote with a regular emoji :upside_down_face:

+

This is a quote with a regular emoji :upside_down_face:

-

This is a quote with an emoji shortcut :slight_smile:

+

This is a quote with an emoji shortcut :slight_smile:

-

This is a quote with a Unicode emoji :sunglasses:

+

This is a quote with a Unicode emoji :sunglasses:

HTML @@ -680,7 +680,7 @@ describe PrettyText do context "emojis" do it "should remove broken emoji" do html = <<~EOS - \":bike:\" \":cat:\" \":discourse:\" + \":bike:\" \":cat:\" \":discourse:\" EOS expect(PrettyText.excerpt(html, 7)).to eq(":bike: …") expect(PrettyText.excerpt(html, 8)).to eq(":bike: …") diff --git a/spec/lib/upload_security_spec.rb b/spec/lib/upload_security_spec.rb index 32ed9ead8f8..4b5cac79049 100644 --- a/spec/lib/upload_security_spec.rb +++ b/spec/lib/upload_security_spec.rb @@ -120,7 +120,7 @@ RSpec.describe UploadSecurity do describe "when it is based on a regular emoji" do it "returns false" do - falafel = Emoji.all.find { |e| e.url == '/images/emoji/twitter/falafel.png?v=9' } + falafel = Emoji.all.find { |e| e.url == "/images/emoji/twitter/falafel.png?v=#{Emoji::EMOJI_VERSION}" } upload.update!(origin: "http://localhost:3000#{falafel.url}") expect(subject.should_be_secure?).to eq(false) end diff --git a/spec/models/upload_spec.rb b/spec/models/upload_spec.rb index c614b28f5d1..b4ad89a66f3 100644 --- a/spec/models/upload_spec.rb +++ b/spec/models/upload_spec.rb @@ -466,7 +466,7 @@ describe Upload do it 'does not mark an upload whose origin matches a regular emoji as secure (sometimes emojis are downloaded in pull_hotlinked_images)' do SiteSetting.login_required = true - falafel = Emoji.all.find { |e| e.url == '/images/emoji/twitter/falafel.png?v=9' } + falafel = Emoji.all.find { |e| e.url == "/images/emoji/twitter/falafel.png?v=#{Emoji::EMOJI_VERSION}" } upload.update!(secure: false, origin: "http://localhost:3000#{falafel.url}") upload.update_secure_status expect(upload.reload.secure).to eq(false)