mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
notifications: Fix composebox notification escaping
The "Narrow to PM with" notification above the composebox was double-escaped, mangling names with single quotes in them. This removes the escaping in i18next, causing the name to be escaped only in handlebars.
This commit is contained in:
committed by
Tim Abbott
parent
e30b524896
commit
4173070b3d
@@ -564,19 +564,21 @@ exports.send_test_notification = function (content) {
|
|||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Note that this returns values that are not HTML-escaped, for use in
|
||||||
|
// handlebars templates that will do further escaping.
|
||||||
function get_message_header(message) {
|
function get_message_header(message) {
|
||||||
if (message.type === "stream") {
|
if (message.type === "stream") {
|
||||||
return message.stream + " > " + message.topic;
|
return message.stream + " > " + message.topic;
|
||||||
}
|
}
|
||||||
if (message.display_recipient.length > 2) {
|
if (message.display_recipient.length > 2) {
|
||||||
return i18n.t("group private messages with __recipient__", {
|
return i18n.t("group private messages with __- recipient__", {
|
||||||
recipient: message.display_reply_to,
|
recipient: message.display_reply_to,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (people.is_current_user(message.reply_to)) {
|
if (people.is_current_user(message.reply_to)) {
|
||||||
return i18n.t("private messages with yourself");
|
return i18n.t("private messages with yourself");
|
||||||
}
|
}
|
||||||
return i18n.t("private messages with __recipient__", {recipient: message.display_reply_to});
|
return i18n.t("private messages with __- recipient__", {recipient: message.display_reply_to});
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.get_local_notify_mix_reason = function (message) {
|
exports.get_local_notify_mix_reason = function (message) {
|
||||||
|
|||||||
@@ -140,8 +140,8 @@ IGNORED_PHRASES = [
|
|||||||
r"\bN\b",
|
r"\bN\b",
|
||||||
# Capital c feels obtrusive in clear status option
|
# Capital c feels obtrusive in clear status option
|
||||||
r"clear",
|
r"clear",
|
||||||
r"group private messages with __recipient__",
|
r"group private messages with __- recipient__",
|
||||||
r"private messages with __recipient__",
|
r"private messages with __- recipient__",
|
||||||
r"private messages with yourself",
|
r"private messages with yourself",
|
||||||
# TO CLEAN UP
|
# TO CLEAN UP
|
||||||
# Just want to avoid churning login.html right now
|
# Just want to avoid churning login.html right now
|
||||||
|
|||||||
Reference in New Issue
Block a user