Browse Source

Merge pull request #915 in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '40481e9d0d953728f7e929a9d07dab6c97fa0416':
  build
  textContent是不会处理转义之后的特殊字符的,所以存在特殊字符的时候需要用innerHtml,并且textContent本就可以防xss,那么只需要检测一下是否存在空格就可以了.其他的标签无所谓.
es6
Dailer 6 years ago
parent
commit
d282fdbac0
  1. 5
      dist/2.0/fineui.ie.js
  2. 12
      dist/2.0/fineui.ie.min.js
  3. 5
      dist/2.0/fineui.js
  4. 6
      dist/2.0/fineui.min.js
  5. 5
      dist/base.js
  6. 5
      dist/bundle.ie.js
  7. 12
      dist/bundle.ie.min.js
  8. 5
      dist/bundle.js
  9. 6
      dist/bundle.min.js
  10. 5
      dist/fineui.ie.js
  11. 12
      dist/fineui.ie.min.js
  12. 5
      dist/fineui.js
  13. 6
      dist/fineui.min.js
  14. 5
      dist/fineui_without_jquery_polyfill.js
  15. 2
      dist/utils.min.js
  16. 5
      src/base/single/text.js

5
dist/2.0/fineui.ie.js vendored

@ -36149,9 +36149,10 @@ BI.Text = BI.inherit(BI.Single, {
this.text.element.html(BI.htmlEncode(this._getShowText()));
return;
}
if (/&|\"|<|>|\\s/.test(text)) {
this.text.element[0].textContent = BI.htmlEncode(this._getShowText());
if (/\s/.test(text)) {
this.text.element[0].innerHTML = BI.htmlEncode(this._getShowText());
} else {
// textContent性能更好,并且原生防xss
this.text.element[0].textContent = this._getShowText();
}
}

12
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

5
dist/2.0/fineui.js vendored

@ -36553,9 +36553,10 @@ BI.Text = BI.inherit(BI.Single, {
this.text.element.html(BI.htmlEncode(this._getShowText()));
return;
}
if (/&|\"|<|>|\\s/.test(text)) {
this.text.element[0].textContent = BI.htmlEncode(this._getShowText());
if (/\s/.test(text)) {
this.text.element[0].innerHTML = BI.htmlEncode(this._getShowText());
} else {
// textContent性能更好,并且原生防xss
this.text.element[0].textContent = this._getShowText();
}
}

6
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

5
dist/base.js vendored

@ -660,9 +660,10 @@ BI.Text = BI.inherit(BI.Single, {
this.text.element.html(BI.htmlEncode(this._getShowText()));
return;
}
if (/&|\"|<|>|\\s/.test(text)) {
this.text.element[0].textContent = BI.htmlEncode(this._getShowText());
if (/\s/.test(text)) {
this.text.element[0].innerHTML = BI.htmlEncode(this._getShowText());
} else {
// textContent性能更好,并且原生防xss
this.text.element[0].textContent = this._getShowText();
}
}

5
dist/bundle.ie.js vendored

@ -36149,9 +36149,10 @@ BI.Text = BI.inherit(BI.Single, {
this.text.element.html(BI.htmlEncode(this._getShowText()));
return;
}
if (/&|\"|<|>|\\s/.test(text)) {
this.text.element[0].textContent = BI.htmlEncode(this._getShowText());
if (/\s/.test(text)) {
this.text.element[0].innerHTML = BI.htmlEncode(this._getShowText());
} else {
// textContent性能更好,并且原生防xss
this.text.element[0].textContent = this._getShowText();
}
}

12
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

5
dist/bundle.js vendored

@ -36553,9 +36553,10 @@ BI.Text = BI.inherit(BI.Single, {
this.text.element.html(BI.htmlEncode(this._getShowText()));
return;
}
if (/&|\"|<|>|\\s/.test(text)) {
this.text.element[0].textContent = BI.htmlEncode(this._getShowText());
if (/\s/.test(text)) {
this.text.element[0].innerHTML = BI.htmlEncode(this._getShowText());
} else {
// textContent性能更好,并且原生防xss
this.text.element[0].textContent = this._getShowText();
}
}

6
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

5
dist/fineui.ie.js vendored

@ -36394,9 +36394,10 @@ BI.Text = BI.inherit(BI.Single, {
this.text.element.html(BI.htmlEncode(this._getShowText()));
return;
}
if (/&|\"|<|>|\\s/.test(text)) {
this.text.element[0].textContent = BI.htmlEncode(this._getShowText());
if (/\s/.test(text)) {
this.text.element[0].innerHTML = BI.htmlEncode(this._getShowText());
} else {
// textContent性能更好,并且原生防xss
this.text.element[0].textContent = this._getShowText();
}
}

12
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

5
dist/fineui.js vendored

@ -36798,9 +36798,10 @@ BI.Text = BI.inherit(BI.Single, {
this.text.element.html(BI.htmlEncode(this._getShowText()));
return;
}
if (/&|\"|<|>|\\s/.test(text)) {
this.text.element[0].textContent = BI.htmlEncode(this._getShowText());
if (/\s/.test(text)) {
this.text.element[0].innerHTML = BI.htmlEncode(this._getShowText());
} else {
// textContent性能更好,并且原生防xss
this.text.element[0].textContent = this._getShowText();
}
}

6
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

5
dist/fineui_without_jquery_polyfill.js vendored

@ -25229,9 +25229,10 @@ BI.Text = BI.inherit(BI.Single, {
this.text.element.html(BI.htmlEncode(this._getShowText()));
return;
}
if (/&|\"|<|>|\\s/.test(text)) {
this.text.element[0].textContent = BI.htmlEncode(this._getShowText());
if (/\s/.test(text)) {
this.text.element[0].innerHTML = BI.htmlEncode(this._getShowText());
} else {
// textContent性能更好,并且原生防xss
this.text.element[0].textContent = this._getShowText();
}
}

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

5
src/base/single/text.js

@ -133,9 +133,10 @@ BI.Text = BI.inherit(BI.Single, {
this.text.element.html(BI.htmlEncode(this._getShowText()));
return;
}
if (/&|\"|<|>|\\s/.test(text)) {
this.text.element[0].textContent = BI.htmlEncode(this._getShowText());
if (/\s/.test(text)) {
this.text.element[0].innerHTML = BI.htmlEncode(this._getShowText());
} else {
// textContent性能更好,并且原生防xss
this.text.element[0].textContent = this._getShowText();
}
}

Loading…
Cancel
Save