mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-17 14:04:47 +08:00
fix: 修复xss漏洞。
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import {mapState} from 'vuex'
|
||||
import {defenseXSS} from 'simple-mind-map/src/utils/xss'
|
||||
|
||||
/**
|
||||
* @Author: 王林
|
||||
@@ -60,7 +61,7 @@ export default {
|
||||
this.words = 0
|
||||
this.num = 0
|
||||
this.walk(data)
|
||||
countEl.innerHTML = this.textStr
|
||||
countEl.innerHTML = defenseXSS(this.textStr)
|
||||
this.words = countEl.textContent.length
|
||||
},
|
||||
|
||||
@@ -101,7 +102,7 @@ export default {
|
||||
background: #262a2e;
|
||||
|
||||
.item {
|
||||
color: hsla(0,0%,100%,.6);
|
||||
color: hsla(0, 0%, 100%, .6);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user