mirror of
https://github.com/zulip/zulip.git
synced 2026-07-18 21:04:19 +08:00
Prettify display of narrowing in our search box.
(imported from commit ccb7f4798a949751a396845baf399591b5d83fb3)
This commit is contained in:
parent
3b8ae6b006
commit
1d37238a89
@ -43,7 +43,10 @@ exports.public_operators = function () {
|
||||
['subject', 'my amazing subject']
|
||||
|
||||
These are not keys in a JavaScript object, because we
|
||||
might need to support multiple operators of the same type. */
|
||||
might need to support multiple operators of the same type.
|
||||
|
||||
Results are not escaped in any way.
|
||||
*/
|
||||
function unparse(operators) {
|
||||
var parts = [];
|
||||
$.each(operators, function (index, elem) {
|
||||
@ -54,8 +57,7 @@ function unparse(operators) {
|
||||
// a colon are glued together to form a search term.
|
||||
parts.push(elem[1]);
|
||||
} else {
|
||||
// FIXME: URI encoding will look really ugly
|
||||
parts.push(elem[0] + ':' + encodeURIComponent(elem[1]).toLowerCase());
|
||||
parts.push(elem[0] + ':' + elem[1].toLowerCase());
|
||||
}
|
||||
});
|
||||
return parts.join(' ');
|
||||
|
||||
@ -292,7 +292,7 @@ function add_message_metadata(message, dummy) {
|
||||
|
||||
case 'private':
|
||||
message.is_private = true;
|
||||
message.reply_to = get_private_message_recipient(message, 'email');
|
||||
message.reply_to = get_private_message_recipient(message, 'email').replace(/ /g, "");
|
||||
message.display_reply_to = get_private_message_recipient(message, 'full_name');
|
||||
|
||||
involved_people = message.display_recipient;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user