Using enable html sanitizer globally

I need to add enable-html-sanitizer true to tooltips, multiselect, textbox other components etc, since I don't need  the malicious code to be interpreted as script. Can I globally set it in my application or do I need to search each component and add inside like

<ejs-tooltip enable-html-sanitizer="true">
My application is build using turborepo and platform is vue

Also  <ejs-tooltip enable-html-sanitizer="true"> when this is used it does not show the content(even as plain text) when 

<img src=text onerror=alert("XSS_Script_Attack")> something like this is the content. Is this the expected result?


1 Reply

YA YuvanShankar Arunagiri Syncfusion Team May 9, 2025 10:59 AM UTC

Hi Sreevatsan,


We have validated your reported query. Currently, we do not provide a global option to enable or disable HTML sanitization across all Syncfusion components. However, HTML sanitizer support is enabled by default for all Syncfusion components to ensure secure rendering.

To better understand how HTML sanitization works with the Tooltip component, please refer to the user guide documentation linked below.


UG link: https://ej2.syncfusion.com/vue/documentation/common/security#html-sanitizer


Please let us know if you need any further assistance on this.


Regards,

YuvanShankar A


Loader.
Up arrow icon