Commit ae69902a authored by Medicean's avatar Medicean

Fix #134 修复部分 self-xss 引起的体验问题

parent c2f5432f
...@@ -34,7 +34,7 @@ class Files { ...@@ -34,7 +34,7 @@ class Files {
for(let gb in global_bookmarks) { for(let gb in global_bookmarks) {
bookmark_opts.push({ bookmark_opts.push({
id: 'bookmark_'+ global_bookmarks[gb], id: 'bookmark_'+ global_bookmarks[gb],
text: gb, text: antSword.noxss(gb),
icon: 'bookmark', icon: 'bookmark',
type: 'button', type: 'button',
enabled: manager.path !== global_bookmarks[gb] enabled: manager.path !== global_bookmarks[gb]
...@@ -47,7 +47,7 @@ class Files { ...@@ -47,7 +47,7 @@ class Files {
for (let _ in bookmark) { for (let _ in bookmark) {
bookmark_opts.push({ bookmark_opts.push({
id: 'bookmark_' + _, id: 'bookmark_' + _,
text: bookmark[_], text: antSword.noxss(bookmark[_]),
icon: 'bookmark-o', icon: 'bookmark-o',
type: 'button', type: 'button',
enabled: manager.path !== _ enabled: manager.path !== _
......
...@@ -26,7 +26,7 @@ module.exports = { ...@@ -26,7 +26,7 @@ module.exports = {
data.push({ data.push({
id: _['_id'], id: _['_id'],
data: [ data: [
_['url'], _['ip'], _['addr'], _['note'], antSword.noxss(_['url']), _['ip'], _['addr'], antSword.noxss(_['note']),
new Date(_['ctime']).format('yyyy/MM/dd hh:mm:ss'), new Date(_['ctime']).format('yyyy/MM/dd hh:mm:ss'),
new Date(_['utime']).format('yyyy/MM/dd hh:mm:ss') new Date(_['utime']).format('yyyy/MM/dd hh:mm:ss')
] ]
......
...@@ -80,7 +80,7 @@ class ShellManager { ...@@ -80,7 +80,7 @@ class ShellManager {
this.category['sidebar'].addItem({ this.category['sidebar'].addItem({
id: _, id: _,
bubble: _data['category'][_], bubble: _data['category'][_],
text: `<i class="fa fa-folder-o"></i> ${_}` text: `<i class="fa fa-folder-o"></i> ${antSword.noxss(_)}`
}); });
} }
// 加载分类数据 // 加载分类数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment