Bug 735998 - HTML entities in the latest tweet should be decoded before it is used as the topic of the timeline conversation, r=clokep.

This commit is contained in:
Florian Quèze 2012-06-14 16:03:54 +02:00
Родитель 28419dc242
Коммит e96a2e26c7
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -317,6 +317,12 @@ Conversation.prototype = {
this.notifyObservers(new nsSimpleEnumerator([chatBuddy]), this.notifyObservers(new nsSimpleEnumerator([chatBuddy]),
"chat-buddy-add"); "chat-buddy-add");
}, },
setTopic: function(aTopic, aTopicSetter) {
const kEntities = {amp: "&", gt: ">", lt: "<"};
let topic =
aTopic.replace(/&([gl]t|amp);/g, function(str, entity) kEntities[entity]);
GenericConvChatPrototype.setTopic.call(this, topic, aTopicSetter);
},
get name() this.nick + " timeline", get name() this.nick + " timeline",
get title() _("timeline", this.nick), get title() _("timeline", this.nick),
get nick() "@" + this._account.name get nick() "@" + this._account.name