File tree 4 files changed +10
-3
lines changed
websites/code2/studygolang
4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,13 @@ SG.replaceCodeChar = function(code) {
89
89
} ) ;
90
90
}
91
91
92
+ // marked 处理之前进行预处理
93
+ SG . preProcess = function ( content ) {
94
+ // 对引用进行处理
95
+ content = content . replace ( / & g t ; / g, '>' ) ;
96
+ return content ;
97
+ }
98
+
92
99
// 分析 @ 的用户
93
100
SG . analyzeAt = function ( text ) {
94
101
var usernames = [ ] ;
Original file line number Diff line number Diff line change 16
16
SG . Topics = function ( ) { }
17
17
SG . Topics . prototype = new SG . Publisher ( ) ;
18
18
SG . Topics . prototype . parseContent = function ( selector ) {
19
- var markdownString = selector . text ( ) ;
19
+ var markdownString = SG . preProcess ( selector . text ( ) ) ;
20
20
// 配置 marked 语法高亮
21
21
marked = SG . markSetting ( ) ;
22
22
Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ <h5>第三方账号登录</h5>
220
220
< script type ="text/javascript ">
221
221
var wsUrl = 'ws://{{.wshost}}/ws?uid={{.me.Uid}}' ;
222
222
</ script >
223
- < script src ="/static/js/common.js?v=1.4 "> </ script >
223
+ < script src ="/static/js/common.js?v=1.5 "> </ script >
224
224
{{template "js" .}}
225
225
< script type ="text/javascript " src ="/static/js/libs/emojify.min.js "> </ script >
226
226
< script type ="text/javascript " src ="/static/js/sidebar.js?v=1.1 "> </ script >
Original file line number Diff line number Diff line change 180
180
< script type ="text/javascript " src ="/static/js/libs/emojify.min.js "> </ script >
181
181
< script type ="text/javascript " src ="/static/js/libs/emojis.js "> </ script >
182
182
< script type ="text/javascript " src ="/static/js/libs/plupload.full.min.js "> </ script >
183
- < script type ="text/javascript " src ="/static/js/topics.js?v=1.1 "> </ script >
183
+ < script type ="text/javascript " src ="/static/js/topics.js?v=1.2 "> </ script >
184
184
< script type ="text/javascript " src ="/static/js/comment.js?v=1.1 "> </ script >
185
185
< script type ="text/javascript " src ="/static/js/puploader.js?v=1.0 "> </ script >
186
186
< script type ="text/javascript ">
You can’t perform that action at this time.
0 commit comments