Skip to content

Commit 586499c

Browse files
committed
Remove placeholder and value from DOM elem serializer
1 parent bee418a commit 586499c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ function htmlElementAsString(elem) {
220220
out.push('.' + classes[i]);
221221
}
222222
}
223-
var attrWhitelist = ['type', 'name', 'value', 'placeholder', 'title', 'alt'];
223+
var attrWhitelist = ['type', 'name', 'title', 'alt'];
224224
for (i = 0; i < attrWhitelist.length; i++) {
225225
key = attrWhitelist[i];
226226
attr = elem.getAttribute(key);

test/utils.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ describe('utils', function () {
188188
placeholder: 'Enter your username'
189189
}[key];
190190
}
191-
}), 'input#the-username.form-control[name="username"][placeholder="Enter your username"]');
191+
}), 'input#the-username.form-control[name="username"]');
192192

193193
assert.equal(htmlElementAsString({
194194
tagName: 'IMG',

0 commit comments

Comments
 (0)