Why WP Editor also strips the “placeholder” attribute of the input text element ?
Ofcourse, i am using the HTML mode.
Here is the input:
<input type="text" value="" name="s" style="width: 550px;" placeholder="Search this website..">
After updating the post (after strip):
<input type="text" value="" name="s" style="width: 550px;">
I do not want WP Editor to strip such attributes.
Any Help ?
The list of allowed elements and attributes is stored in the global variable
$allowedposttags
which is set inwp-includes/kses.php
.To override it create a simple mu plugin with the following content:
This post with the content
<input placeholder="pass" required />
was created with an author account:You could use a shortcode! 😉
Untested, but should definitely work!