I want the following tags to be allowed in HTMLPurifier. For example:
<ins cite="blog.html"></ins>
<blockquote cite="https://www.google.com/"></blockquote>
Thank you
HTMLPurifier allowing blockquote and ins tag with cite
51 Views Asked by Fatemeh Namkhah AtI want the following tags to be allowed in HTMLPurifier. For example:
<ins cite="blog.html"></ins> <blockquote cite="https://www.google.com/"></blockquote>Thank you
1There are 1 best solutions below
You can add additional tags and attributes to the allowed list. For example, to add
blockquoteandinstags with theciteattribute:Now, when you use this
$purifierinstance to purify HTML, it will allow theciteattribute for bothblockquoteandinstags in addition to the default allowed tags and attributes.Remember to customize the allowed elements and attributes carefully to match your specific use case and security requirements. Always validate and sanitize user input to prevent XSS attacks and other security vulnerabilities in your application.