aboutsummaryrefslogtreecommitdiff
path: root/ext/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-12-14 14:55:24 -0500
committerGitHub <noreply@github.com>2021-12-14 14:55:24 -0500
commitecbbfa39a22c2e70a2c5af262d77dea80fb309f8 (patch)
tree30fe581368b1744f4c944ab69f727c4f96e71eeb /ext/js
parent0356241362176d40f627bee89ac1ae3bbcfff075 (diff)
Fix non-text <input> elements being included in scanning content (#2034)
Diffstat (limited to 'ext/js')
-rw-r--r--ext/js/dom/document-util.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/js/dom/document-util.js b/ext/js/dom/document-util.js
index 8c7adf2c..163800c1 100644
--- a/ext/js/dom/document-util.js
+++ b/ext/js/dom/document-util.js
@@ -39,8 +39,10 @@ class DocumentUtil {
case 'SELECT':
return new TextSourceElement(element);
case 'INPUT':
- imposterSourceElement = element;
- [imposter, imposterContainer] = this._createImposter(element, false);
+ if (element.type === 'text') {
+ imposterSourceElement = element;
+ [imposter, imposterContainer] = this._createImposter(element, false);
+ }
break;
case 'TEXTAREA':
imposterSourceElement = element;