Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e5e6ec8

Browse files
author
xuxinhua
committed
bugfix issue:#8
1 parent 42a3128 commit e5e6ec8

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

websites/code/studygolang/static/js/comment.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
marked.setOptions({
123123
highlight: function (code) {
124124
code = code.replace(/"/g, '"');
125+
code = code.replace(/'/g, "'");
125126
code = code.replace(/&lt;/g, '<');
126127
code = code.replace(/&gt;/g, '>');
127128
code = code.replace(/&amp;/g, '&');

websites/code/studygolang/static/js/common.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ SG.Publisher.prototype = {
6363

6464
SG.replaceSpecialChar = function(str) {
6565
str = str.replace(/&#34;/g, '"');
66+
str = str.replace(/&#39;/g, "'");
6667
str = str.replace(/&lt;/g, '<');
6768
str = str.replace(/&gt;/g, '>');
6869
str = str.replace(/&amp;/g, '&');

0 commit comments

Comments
 (0)