We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d462e44 commit 9a9226cCopy full SHA for 9a9226c
test/129.js
@@ -0,0 +1,10 @@
1
+const { parse } = require('../dist');
2
+
3
+// see: https://github.com/taoqf/node-html-parser/issues/129
4
+describe('Prototype pollution', () => {
5
+ it('prevents prototype pollution', () => {
6
+ const root = parse('<a href="#" __proto__="polluted=true">');
7
+ should(root.firstChild.attributes.polluted).not.be.ok();
8
+ should(root.firstChild.attributes.hasOwnProperty('proto__')).be.ok();
9
+ });
10
+});
0 commit comments