Skip to content

Commit

Permalink
继续更新at人的处理问题
Browse files Browse the repository at this point in the history
  • Loading branch information
时雨 committed May 7, 2015
1 parent 1b413f0 commit ad8c000
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion static/assets/js/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ $(document).ready(function(){
$(".minos-at").each(function(){
var txt = $(this).text();
//666666
txt = txt.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
txt = txt.replace(/&/g, "&amp;")
.replace(/</g, "&lt;").replace(/>/g, "&gt;")
.replace(/'/g, "&#039;").replace(/"/g, "&quot;");
txt = txt.replace(/@([a-zA-Z0-9_\-\u4e00-\u9fa5]+)/g, '<a href="/user/detail/$1">@$1</a>');
txt = txt.replace(/\n/g, "<br />");
$(this).html(txt);
Expand Down

0 comments on commit ad8c000

Please sign in to comment.