[fix] js unexpected token (#534)
This commit is contained in:
parent
0628fc9478
commit
ab1f133d81
|
@ -19,7 +19,7 @@ utils.jq(() => {
|
|||
var cell = '<div class="timenode" index="' + i + '">';
|
||||
cell += '<div class="header">';
|
||||
cell += '<div class="user-info">';
|
||||
cell += '<img src="' + (item.author.avatarUrl || default_avatar) + '" onerror="javascript:this.src=\\'' + default_avatar + '\\';">';
|
||||
cell += '<img src="' + (item.author.avatarUrl || default_avatar) + '" onerror="javascript:this.src=\'' + default_avatar + '\';">';
|
||||
cell += '<span>' + item.author.login + '</span>';
|
||||
cell += '</div>';
|
||||
cell += '<span>' + new Date(item.createdAt).toLocaleString() + '</span>';
|
||||
|
@ -34,4 +34,3 @@ utils.jq(() => {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -15,13 +15,13 @@ utils.jq(() => {
|
|||
var cell = '<div class="timenode" index="' + i + '">';
|
||||
cell += '<div class="header">';
|
||||
cell += '<div class="user-info">';
|
||||
cell += '<img src="' + (item.avatar || default_avatar) + '" onerror="javascript:this.src=\\'' + default_avatar + '\\';">';
|
||||
cell += '<img src="' + (item.avatar || default_avatar) + '" onerror="javascript:this.src=\'' + default_avatar + '\';">';
|
||||
cell += '<span>' + item.nick + '</span>';
|
||||
cell += '</div>';
|
||||
cell += '<span>' + new Date(item.time).toLocaleString() + '</span>';
|
||||
cell += '</div>';
|
||||
cell += '<a class="body" href="' + item.url + '#' + item.objectId + '" target="_blank" rel="external nofollow noopener noreferrer">';
|
||||
cell += item.comment.replace(/<a\\b[^>]*>(.*?)<\\/a>/g, '$1');
|
||||
cell += item.comment.replace(/<a\b[^>]*>(.*?)<\/a>/g, '$1');
|
||||
cell += '</a>';
|
||||
cell += '</div>';
|
||||
$(el).append(cell);
|
||||
|
@ -30,4 +30,3 @@ utils.jq(() => {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue