Forums
Home / Plugins / How do I edit what HTML is allowed in comments?
19 years, 11 months ago
I want the img tag to be allowed in comments. How would I do that?
(@podz)
Check the file wp-includes/kses.php then clear your cache before checking.
I added this line: ‘img’ => array(), I now get an image placeholder, but the image itself isn’t loading
I figured it out, I needed the line: ‘img’ => array( ‘src’ => array(), ‘alt’ => array()),
(@razorsa)
19 years ago
I followed your advise and added: ‘img’ => array( ‘src’ => array(), ‘alt’ => array()),
It works 100%… Thanks.
(@sproke)
18 years, 7 months ago
Just to make it a bit easier for people who don’t really know what they’re doing (like me till I figured it out) this is the code that I have used:
$allowedtags = array ('a' => array ('href' => array (), 'title' => array ()), 'img' => array( 'src' => array(), 'alt' => array()), 'abbr' => array ('title' => array ()), 'acronym' => array ('title' => array ()), 'b' => array (), 'blockquote' => array ('cite' => array ()),
Hope this helps