From bd52f4d48b1ca8f71384a471c31ffe9b75f29fc0 Mon Sep 17 00:00:00 2001 From: llj Date: Fri, 31 Aug 2012 20:48:56 +0800 Subject: [PATCH] [@]format str before giving it to ele_cp --- media/js/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/js/utils.js b/media/js/utils.js index 9f73944995..5c00a65a7f 100644 --- a/media/js/utils.js +++ b/media/js/utils.js @@ -118,7 +118,7 @@ function addAtAutocomplete(ele_id, container_id, data, ele_css) { end_str = $(this).val().substring(pos); str = $(this).val().substring(0, pos); } - ele_cp.html(str + '@'); + ele_cp.html(str.replace(//g, '>').replace(/`/g, '`').replace(/"/g, '"').replace(/\r\n|\r|\n/g, "
") + '@'); var line_height = parseInt(ele_cp.css('line-height')), at_pos = $(ele_id + '-at').position(), x = at_pos.left,