HTML appearing in input rather then the placeholder.
Closed this issue · 1 comments
lukealford commented
Love what you have done and works great, I'm just having a small problem with one or two input's that seem to be adding HTML inside the input while using IE10.
- IE10 HTML code is visible in First Name and Last Name fields (step 2 of
the donation form)
https://greens.org.au/civicrm/contribute/transact?reset=1&id=298&action=.
jamesallardice commented
It doesn't look like you're actually using this polyfill on that page. There's a lot of code on there to read through but searching for placeholder
in one of those massive JS files reveals the following:
var settings = {
tooltip : 'Click to edit...',
placeholder : '<span class="crm-editable-placeholder">Click to edit</span>',
data: function(value, settings) {
return value.replace(/<(?:.|\n)*?>/gm, '');
}
};
if ($i.data('placeholder')) {
settings.placeholder = $i.data('placeholder');
} else {
settings.placeholder = '<span class="crm-editable-placeholder">Click to edit</span>';
}
That looks to me like you're intentionally adding HTML to the placeholders. But as I said, there's a lot of code in there so I may be missing something. I'm closing this issue for now, but can reopen if you can add more detail.