changed to title raw

v1.18.x
Barış Soner Uşaklı 9 years ago
parent ef48b5d13e
commit 573840ccbd

@ -217,7 +217,7 @@ define('forum/topic', [
function updateTopicTitle() {
var span = components.get('navbar/title').find('span');
if ($(window).scrollTop() > 50) {
span.html(ajaxify.data.titleEscaped).show();
span.html(ajaxify.data.title).show();
} else {
span.html('').hide();
}

@ -194,7 +194,7 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
slug: ajaxify.data.slug,
index: getData(button, 'data-index'),
pid: toPid,
topicName: ajaxify.data.title,
topicName: ajaxify.data.titleRaw,
username: username,
text: selectionText
});
@ -202,7 +202,7 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
$(window).trigger('action:composer.post.new', {
tid: tid,
pid: toPid,
topicName: ajaxify.data.title,
topicName: ajaxify.data.titleRaw,
text: username ? username + ' ' : ''
});
}
@ -227,7 +227,7 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
index: getData(button, 'data-index'),
pid: pid,
username: username,
topicName: ajaxify.data.title,
topicName: ajaxify.data.titleRaw,
text: post
});
});

@ -131,7 +131,7 @@ topicsController.get = function(req, res, callback) {
url: nconf.get('relative_path') + '/category/' + data.topicData.category.slug
},
{
text: validator.escape(data.topicData.title)
text: data.topicData.title
}
];

@ -58,7 +58,8 @@ module.exports = function(Topics) {
if (!topic) {
return;
}
topic.titleEscaped = validator.escape(topic.title);
topic.titleRaw = topic.title;
topic.title = validator.escape(topic.title);
topic.relativeTime = utils.toISOString(topic.timestamp);
topic.lastposttimeISO = utils.toISOString(topic.lastposttime);
}

@ -154,8 +154,8 @@ describe('Topic\'s', function() {
assert.ifError(err);
topics.getTopicData(result.topicData.tid, function(err, topicData) {
assert.ifError(err);
assert.strictEqual(topicData.titleEscaped, titleEscaped);
assert.strictEqual(topicData.title, title);
assert.strictEqual(topicData.titleRaw, title);
assert.strictEqual(topicData.title, titleEscaped);
done();
});
});

Loading…
Cancel
Save