From 646d6199a644a1e6d65706c400163d00fa310bfe Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 2 Jun 2015 13:25:33 +0800 Subject: Bug 1146771: implement comment tagging --- js/field.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'js/field.js') diff --git a/js/field.js b/js/field.js index 778451daf..fdacd4728 100644 --- a/js/field.js +++ b/js/field.js @@ -738,10 +738,7 @@ $(function() { formatResult: function(suggestion, currentValue) { return (suggestion.data.name === '' ? suggestion.data.login : suggestion.data.name + ' (' + suggestion.data.login + ')') - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); + .htmlEncode(); }, onSearchStart: function(params) { var that = $(this); @@ -800,11 +797,7 @@ $(function() { autoSelectFirst: true, formatResult: function(suggestion, currentValue) { // disable wrapping of matched substring - return suggestion.value - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); + return suggestion.value.htmlEncode(); }, onSelect: function() { this.focus(); -- cgit v1.2.3-24-g4f1b