Skip to content

Commit

Permalink
textarea 修复注入xss问题 #I8O21R
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Dec 13, 2023
1 parent a98c2b5 commit d70b0e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/table/src/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,10 @@ export default {
elemStore[`${prefix}xSpace`] = $refs.xSpace
elemStore[`${prefix}ySpace`] = $refs.ySpace
elemStore[`${prefix}emptyBlock`] = $refs.emptyBlock
this.$el.onscroll = this.scrollEvent
this.$el._onscroll = this.scrollEvent
if (this.$el) {
this.$el.onscroll = this.scrollEvent
this.$el._onscroll = this.scrollEvent
}
},
beforeDestroy () {
clearTimeout(this.wheelTime)
Expand Down
2 changes: 1 addition & 1 deletion packages/textarea/src/textarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export default {
autoTxtElem.className = ['vxe-textarea--autosize', size ? `size--${size}` : ''].join(' ')
autoTxtElem.style.width = `${textElem.clientWidth}px`
autoTxtElem.style.padding = textStyle.padding
autoTxtElem.innerHTML = ('' + (inputValue || ' ')).replace(/\n$/, '\n ')
autoTxtElem.innerText = ('' + (inputValue || ' ')).replace(/\n$/, '\n ')
}
},
handleResize () {
Expand Down

0 comments on commit d70b0e0

Please sign in to comment.