• How do I allowed HTML ( unfiltered HTML) in comments? I got someone trying to post comment with embed a video in Sign language and can’t seem to find the right code that work with twentytwenty theme to allowed tag and HTML code in comments please let me know how that can be done.. thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • https://wordpress.org/support/article/roles-and-capabilities/#unfiltered_html
    Enabling unfiltered HTML for untrusted users is inadvisable, as they may post malicious or incorrect code that can break a site.
    By default, unfiltered HTML is restricted to administrators and editors.

    Thread Starter xoldie


    so my visitor have no chance to leave a video comments in ASL (America sign language) on wordpress? There gotta be a way for them to leave video comments.
    They were using this site https://streamable.com/ to embed the video in the comments.

    Comments are not intended for video posts.
    They can still leave a link to the video in the comment.

    Alternatively, you can require registration, grant them contributor rights (contributor submissions need to be reviewed by an editor or administrator) or above and allow the unfiltered HTML that way.

    Moderator bcworkz


    I’ve not verified this, but I believe you could use the “wp_kses_allowed_html” filter to add video and source tags to the list so users can use such HTML even though their comment is still filtered for dangerous HTML. The list also includes allowed attributes for each tag. You’ll need to dump out the default list for examination to know how to properly add new data.

    I also do not know if allowing video tags would open the door for malicious code or not. At the very least it would allow visitors to post entirely inappropriate video content that’s not filtered by the usual spam filtering measures. I recommend that videos only be allowed for visitors that have logged in to minimize the risks involved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘allowed hmtl ( unfiltered hmtl) in comments?’ is closed to new replies.