FIX: Fixed changing composer mode escaping title (#7191)

This commit is contained in:
Tim Lange 2019-03-25 08:44:26 +01:00 committed by Arpit Jalan
parent 5a9dd923cc
commit dcd56cf593
2 changed files with 10 additions and 2 deletions

View File

@ -910,7 +910,7 @@ export default Ember.Controller.extend({
opts.topicTitle &&
opts.topicTitle.length <= this.siteSettings.max_topic_title_length
) {
this.set("model.title", escapeExpression(opts.topicTitle));
this.set("model.title", opts.topicTitle);
}
if (opts.topicCategoryId) {

View File

@ -139,7 +139,10 @@ QUnit.test("shared draft", async assert => {
await visit("/");
await click("#create-topic");
await fillIn("#reply-title", "This is the new text for the title");
await fillIn(
"#reply-title",
"This is the new text for the title using 'quotes'"
);
await fillIn(".d-editor-input", "This is the new text for the post");
await tags.expand();
await tags.selectRowByValue("monkey");
@ -149,6 +152,11 @@ QUnit.test("shared draft", async assert => {
assert.equal(tags.header().value(), "monkey", "tags are not reset");
assert.equal(
find("#reply-title").val(),
"This is the new text for the title using 'quotes'"
);
assert.equal(
find("#reply-control .btn-primary.create .d-button-label").text(),
I18n.t("composer.create_shared_draft")