Revert "FIX: Better emoji escaping for topic title"

This reverts commit 35426b5ad6.
This commit is contained in:
Joffrey JAFFEUX
2019-03-13 13:02:56 +01:00
parent 3eebf8be73
commit d32557ea32
15 changed files with 141 additions and 221 deletions
@@ -1,5 +1,5 @@
import { acceptance } from "helpers/qunit-helpers";
import { IMAGE_VERSION as v } from "pretty-text/emoji/version";
import { IMAGE_VERSION as v } from "pretty-text/emoji";
import { resetCache } from "discourse/components/emoji-picker";
acceptance("EmojiPicker", {
@@ -1,4 +1,4 @@
import { IMAGE_VERSION as v } from "pretty-text/emoji/version";
import { IMAGE_VERSION as v } from "pretty-text/emoji";
import { acceptance } from "helpers/qunit-helpers";
acceptance("Emoji", { loggedIn: true });
+1 -18
View File
@@ -1,5 +1,5 @@
import { acceptance } from "helpers/qunit-helpers";
import { IMAGE_VERSION as v } from "pretty-text/emoji/version";
import { IMAGE_VERSION as v } from "pretty-text/emoji";
acceptance("Topic", {
loggedIn: true,
@@ -121,23 +121,6 @@ QUnit.test("Updating the topic title with emojis", async assert => {
);
});
QUnit.test("Updating the topic title with unicode emojis", async assert => {
await visit("/t/internationalization-localization/280");
await click("#topic-title .d-icon-pencil-alt");
await fillIn("#edit-title", "emojis title 👨‍🌾");
await click("#topic-title .submit-edit");
assert.equal(
find(".fancy-title")
.html()
.trim(),
`emojis title <img src="/images/emoji/emoji_one/man_farmer.png?v=${v}" title="man_farmer" alt="man_farmer" class="emoji">`,
"it displays the new title with escaped unicode emojis"
);
});
acceptance("Topic featured links", {
loggedIn: true,
settings: {
+1 -2
View File
@@ -1,5 +1,4 @@
import { emojiSearch } from "pretty-text/emoji";
import { IMAGE_VERSION as v } from "pretty-text/emoji/version";
import { emojiSearch, IMAGE_VERSION as v } from "pretty-text/emoji";
import { emojiUnescape } from "discourse/lib/text";
QUnit.module("lib:emoji");
+1 -1
View File
@@ -1,7 +1,7 @@
import Quote from "discourse/lib/quote";
import Post from "discourse/models/post";
import { default as PrettyText, buildOptions } from "pretty-text/pretty-text";
import { IMAGE_VERSION as v } from "pretty-text/emoji/version";
import { IMAGE_VERSION as v } from "pretty-text/emoji";
import { INLINE_ONEBOX_LOADING_CSS_CLASS } from "pretty-text/inline-oneboxer";
QUnit.module("lib:pretty-text");
+1 -1
View File
@@ -1,4 +1,4 @@
import { IMAGE_VERSION as v } from "pretty-text/emoji/version";
import { IMAGE_VERSION as v } from "pretty-text/emoji";
QUnit.module("model:topic");