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

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

diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6
index 52deb54..b69ec6f 100644
--- a/app/assets/javascripts/discourse/controllers/composer.js.es6
+++ b/app/assets/javascripts/discourse/controllers/composer.js.es6
@@ -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) {
diff --git a/test/javascripts/acceptance/composer-actions-test.js.es6 b/test/javascripts/acceptance/composer-actions-test.js.es6
index 9ee3868..51db4a4 100644
--- a/test/javascripts/acceptance/composer-actions-test.js.es6
+++ b/test/javascripts/acceptance/composer-actions-test.js.es6
@@ -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");
@@ -150,6 +153,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")
   );

GitHub sha: dcd56cf5