jamesallardice/Placeholders.js

HTML appearing in input rather then the placeholder.

Closed this issue · 1 comments

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.

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.