FIX: manually adds frowning_face_with_open_mouth for apple (#13528)
This commit is contained in:
parent
78ab3f37b8
commit
5eb6e9281a
|
@ -1,4 +1,4 @@
|
||||||
// DO NOT EDIT THIS FILE!!!
|
// DO NOT EDIT THIS FILE!!!
|
||||||
// Update it by running `rake javascript:update_constants`
|
// Update it by running `rake javascript:update_constants`
|
||||||
|
|
||||||
export const IMAGE_VERSION = "9";
|
export const IMAGE_VERSION = "10";
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
class Emoji
|
class Emoji
|
||||||
# update this to clear the cache
|
# update this to clear the cache
|
||||||
EMOJI_VERSION = "9"
|
EMOJI_VERSION = "10"
|
||||||
|
|
||||||
FITZPATRICK_SCALE ||= [ "1f3fb", "1f3fc", "1f3fd", "1f3fe", "1f3ff" ]
|
FITZPATRICK_SCALE ||= [ "1f3fb", "1f3fc", "1f3fd", "1f3fe", "1f3ff" ]
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ describe PrettyText do
|
||||||
MD
|
MD
|
||||||
|
|
||||||
expect(cooked).to include(<<~HTML)
|
expect(cooked).to include(<<~HTML)
|
||||||
<div class="poll-title">What’s your favorite <em>berry</em>? <img src="/images/emoji/twitter/wink.png?v=9" title=":wink:" class="emoji" alt=":wink:"> <a href="https://google.com/" rel="noopener nofollow ugc">https://google.com/</a>
|
<div class="poll-title">What’s your favorite <em>berry</em>? <img src="/images/emoji/twitter/wink.png?v=#{Emoji::EMOJI_VERSION}" title=":wink:" class="emoji" alt=":wink:"> <a href="https://google.com/" rel="noopener nofollow ugc">https://google.com/</a>
|
||||||
</div>
|
</div>
|
||||||
HTML
|
HTML
|
||||||
end
|
end
|
||||||
|
@ -185,7 +185,7 @@ describe PrettyText do
|
||||||
MD
|
MD
|
||||||
|
|
||||||
expect(cooked).to include(<<~HTML)
|
expect(cooked).to include(<<~HTML)
|
||||||
<div class="poll-title">What’s your favorite <em>berry</em>? <img src="/images/emoji/twitter/wink.png?v=9" title=":wink:" class="emoji" alt=":wink:"> <a href="https://google.com/" rel="noopener nofollow ugc">https://google.com/</a>
|
<div class="poll-title">What’s your favorite <em>berry</em>? <img src="/images/emoji/twitter/wink.png?v=#{Emoji::EMOJI_VERSION}" title=":wink:" class="emoji" alt=":wink:"> <a href="https://google.com/" rel="noopener nofollow ugc">https://google.com/</a>
|
||||||
</div>
|
</div>
|
||||||
HTML
|
HTML
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
|
@ -159,13 +159,13 @@ describe PrettyText do
|
||||||
|
|
||||||
html = <<~HTML
|
html = <<~HTML
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>This is a quote with a regular emoji <img src="https://emoji.cdn.com/twitter/upside_down_face.png?v=9" title=":upside_down_face:" class="emoji" alt=":upside_down_face:"></p>
|
<p>This is a quote with a regular emoji <img src="https://emoji.cdn.com/twitter/upside_down_face.png?v=#{Emoji::EMOJI_VERSION}" title=":upside_down_face:" class="emoji" alt=":upside_down_face:"></p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>This is a quote with an emoji shortcut <img src="https://emoji.cdn.com/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"></p>
|
<p>This is a quote with an emoji shortcut <img src="https://emoji.cdn.com/twitter/slight_smile.png?v=#{Emoji::EMOJI_VERSION}" title=":slight_smile:" class="emoji" alt=":slight_smile:"></p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>This is a quote with a Unicode emoji <img src="https://emoji.cdn.com/twitter/sunglasses.png?v=9" title=":sunglasses:" class="emoji" alt=":sunglasses:"></p>
|
<p>This is a quote with a Unicode emoji <img src="https://emoji.cdn.com/twitter/sunglasses.png?v=#{Emoji::EMOJI_VERSION}" title=":sunglasses:" class="emoji" alt=":sunglasses:"></p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
HTML
|
HTML
|
||||||
|
|
||||||
|
@ -180,13 +180,13 @@ describe PrettyText do
|
||||||
|
|
||||||
html = <<~HTML
|
html = <<~HTML
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>This is a quote with a regular emoji <img src="https://emoji.cdn.com/twitter/upside_down_face.png?v=9" title=":upside_down_face:" class="emoji" alt=":upside_down_face:"></p>
|
<p>This is a quote with a regular emoji <img src="https://emoji.cdn.com/twitter/upside_down_face.png?v=#{Emoji::EMOJI_VERSION}" title=":upside_down_face:" class="emoji" alt=":upside_down_face:"></p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>This is a quote with an emoji shortcut <img src="https://emoji.cdn.com/twitter/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"></p>
|
<p>This is a quote with an emoji shortcut <img src="https://emoji.cdn.com/twitter/slight_smile.png?v=#{Emoji::EMOJI_VERSION}" title=":slight_smile:" class="emoji" alt=":slight_smile:"></p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>This is a quote with a Unicode emoji <img src="https://emoji.cdn.com/twitter/sunglasses.png?v=9" title=":sunglasses:" class="emoji" alt=":sunglasses:"></p>
|
<p>This is a quote with a Unicode emoji <img src="https://emoji.cdn.com/twitter/sunglasses.png?v=#{Emoji::EMOJI_VERSION}" title=":sunglasses:" class="emoji" alt=":sunglasses:"></p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
HTML
|
HTML
|
||||||
|
|
||||||
|
@ -680,7 +680,7 @@ describe PrettyText do
|
||||||
context "emojis" do
|
context "emojis" do
|
||||||
it "should remove broken emoji" do
|
it "should remove broken emoji" do
|
||||||
html = <<~EOS
|
html = <<~EOS
|
||||||
<img src=\"//localhost:3000/images/emoji/twitter/bike.png?v=9\" title=\":bike:\" class=\"emoji\" alt=\":bike:\"> <img src=\"//localhost:3000/images/emoji/twitter/cat.png?v=9\" title=\":cat:\" class=\"emoji\" alt=\":cat:\"> <img src=\"//localhost:3000/images/emoji/twitter/discourse.png?v=9\" title=\":discourse:\" class=\"emoji\" alt=\":discourse:\">
|
<img src=\"//localhost:3000/images/emoji/twitter/bike.png?v=#{Emoji::EMOJI_VERSION}\" title=\":bike:\" class=\"emoji\" alt=\":bike:\"> <img src=\"//localhost:3000/images/emoji/twitter/cat.png?v=#{Emoji::EMOJI_VERSION}\" title=\":cat:\" class=\"emoji\" alt=\":cat:\"> <img src=\"//localhost:3000/images/emoji/twitter/discourse.png?v=#{Emoji::EMOJI_VERSION}\" title=\":discourse:\" class=\"emoji\" alt=\":discourse:\">
|
||||||
EOS
|
EOS
|
||||||
expect(PrettyText.excerpt(html, 7)).to eq(":bike: …")
|
expect(PrettyText.excerpt(html, 7)).to eq(":bike: …")
|
||||||
expect(PrettyText.excerpt(html, 8)).to eq(":bike: …")
|
expect(PrettyText.excerpt(html, 8)).to eq(":bike: …")
|
||||||
|
|
|
@ -120,7 +120,7 @@ RSpec.describe UploadSecurity do
|
||||||
|
|
||||||
describe "when it is based on a regular emoji" do
|
describe "when it is based on a regular emoji" do
|
||||||
it "returns false" 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}")
|
upload.update!(origin: "http://localhost:3000#{falafel.url}")
|
||||||
expect(subject.should_be_secure?).to eq(false)
|
expect(subject.should_be_secure?).to eq(false)
|
||||||
end
|
end
|
||||||
|
|
|
@ -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
|
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
|
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: false, origin: "http://localhost:3000#{falafel.url}")
|
||||||
upload.update_secure_status
|
upload.update_secure_status
|
||||||
expect(upload.reload.secure).to eq(false)
|
expect(upload.reload.secure).to eq(false)
|
||||||
|
|
Loading…
Reference in New Issue