NicolasCARPi / jquery_jeditable

jQuery edit in place plugin. Extendable via plugin architecture. Plugins for plugin. Really.
https://jeditable.elabftw.net
MIT License
1.74k stars 459 forks source link

Remove HTML in placeholder attributes #190

Closed Krisseck closed 5 years ago

Krisseck commented 5 years ago

I had a problem where if I had an placeholder like <span class="placeholder">Click to edit...</span>, it would correctly display the HTML content on the page, but the input field's placeholder-attribute also had the HTML code in it.

This pull request removes all HTML code in when applying the placeholder attributes.

NicolasCARPi commented 5 years ago

Thanks. I will review and merge asap :)

NicolasCARPi commented 5 years ago

Hello,

Why would you have html in the placeholder option?

Krisseck commented 5 years ago

Because I want to style the placeholder. I cannot really apply any CSS to the placeholder because the code is identical.

NicolasCARPi commented 5 years ago

Hello Kristian,

I'm gonna have to decline this change as it is IMHO the wrong solution to your problem and would add unnecessary complexity; lessen the code clarity (placeholder should be a HTML free string).

Thanks anyway for your contribution. It is difficult for an open source maintainer to say no to a PR, but sometimes necessary. And I feel it's one of these times.

Regards, ~Nico