mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add :title as attribute for basic_topic
When we update the <title> after editing a topic, we should use the raw `topic.title` as `topic.fancy_title` may contains some htmlentities and will be displayed as is in the browser tab. This fix the following issue: > Incorrect HTML title after editing title/category of topic > http://meta.discourse.org/t/incorrect-html-title-after-editing-title-category-of-topic/8136
This commit is contained in:
@@ -149,10 +149,11 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
|
||||
// save the modifications
|
||||
topic.save().then(function(result){
|
||||
// update the title if it has been changed (cleaned up) server-side
|
||||
var title = result.basic_topic.fancy_title;
|
||||
var title = result.basic_topic.title;
|
||||
var fancy_title = result.basic_topic.fancy_title;
|
||||
topic.setProperties({
|
||||
title: title,
|
||||
fancy_title: title
|
||||
fancy_title: fancy_title
|
||||
});
|
||||
|
||||
}, function(error) {
|
||||
|
||||
Reference in New Issue
Block a user