Prettify display of narrowing in our search box.

(imported from commit ccb7f4798a949751a396845baf399591b5d83fb3)
This commit is contained in:
Tim Abbott 2013-03-04 17:42:30 -05:00
parent 3b8ae6b006
commit 1d37238a89
2 changed files with 6 additions and 4 deletions

View File

@ -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(' ');

View File

@ -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;