- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 10:19 AM
Hi,
We have some Knowledge Base article creators that would like to embed videos from a trusted source and we are unable to use iframe. It looks like the iframe tag is removed because of the HTMLSanitizerConfig Script Include, which we do not want to disable, but we do want to add iframe to the whitelist. However, I have a problem adding anything to this Script Include as I receive the following alerts:
I have attempted following various pages about how to embed videos such as the below links but have not seen others encountering these alerts:
https://community.servicenow.com/community?id=community_blog&sys_id=5a1ad5b3db9e54106621d9d968961966
https://community.servicenow.com/community?id=community_question&sys_id=62a443e9dbd8dbc01dcaf3231f9619c8
https://community.servicenow.com/community?id=community_question&sys_id=1a971045db9ed490190b1ea6689619ec
I have attempted to elevate my security role but that has no effect. I am also unable to add a simple comment to this Script Include. Does anyone know what I may be missing? Or is there a better method to embed videos in KB articles? I will note the video tag will not work for us as the direct link to these videos is constantly changing. It appears the host's database constantly updates the video files' direct links periodically.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 04:03 PM
I've used a couple things that worked for me.
<!--Changing the URL to an attachment works as well with this-->
<p><video controls="controls" width="800" height="480"><source src="URL" /></video></p>
<!--Not sure why iFrame didn't work for you, but this did without using a sanitizer-->
<p><iframe src=https://www.youtube.com/embed/XZsy8T47FG0 width="1280" height="720" allowfullscreen=""></iframe></p>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 04:03 PM
I've used a couple things that worked for me.
<!--Changing the URL to an attachment works as well with this-->
<p><video controls="controls" width="800" height="480"><source src="URL" /></video></p>
<!--Not sure why iFrame didn't work for you, but this did without using a sanitizer-->
<p><iframe src=https://www.youtube.com/embed/XZsy8T47FG0 width="1280" height="720" allowfullscreen=""></iframe></p>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2023 11:45 PM
As a very late update to this, the above worked without issue. Originally, it did not. I suspect it could have been the result of a bug when we were still on Quebec as after we upgraded to San Diego I had no issue with the embedding later on.