The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Embedding video into knowledge articles

saj4
Kilo Expert

Hi, I'm trying to embed a video (shockwave flash) into a knowledge article.

I have imported the video into ServiceNow (System UI > Videos) and it plays fine.

The knowledge articles allow videos to be embedded via 'insert/edit' video option. I am able to select and embed the video (its shows as a grey image) but upon saving the article and then trying to view the article or re-edit it, the video is nowhere to be seen or found.

Am using latest Fuji release and tried both firefix and chrome browsers.

Has anyone been able to successfully embed videos into knowledge arcticles or advise if I need to do anything additional? Thx.

1 ACCEPTED SOLUTION

Video not working in the HTML field on Knowledge is almost certainly down to HTML Sanitize being on on that field. I had the same issue. Video worked, saved the record and then it just isn't there.



The HTML Sanitizer property can be disabled either globally or on a a field by field basis. By default it's enabled and causes the issue you are seeing.



see:



HTML Sanitizer - ServiceNow Wiki



Hope that fixes your issue.


View solution in original post

16 REPLIES 16

One more try,   if it doesn't work, that's it.



Here's my final attempt to show you the HTML for the redirector page:



<html><head>


<meta http-equiv="refresh" content="0; url=https://www.youtube.com/embed/7JrLzURzsBA" />


</head>


<body>


If you can read this click the following link to see the video.


<a href="https://www.youtube.com/embed/7JrLzURzsBA">Watch Video</a>


</body>


</html>





What I wouldn't give for a preview function now.


Video not working in the HTML field on Knowledge is almost certainly down to HTML Sanitize being on on that field. I had the same issue. Video worked, saved the record and then it just isn't there.



The HTML Sanitizer property can be disabled either globally or on a a field by field basis. By default it's enabled and causes the issue you are seeing.



see:



HTML Sanitizer - ServiceNow Wiki



Hope that fixes your issue.


Thanks Paul, that has finally done the trick!


Hi Paul,


This resolution looks really good, I am having difficulties to put the below video code onto the Sanitizer White list? Any ideas?



<p>  




<object width="600" height="350" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab">




<param name="movie" value="sys_attachment.do?sys_id=dd8ad3dbdb892e00813adb9dae961948&amp;view=true" />




<param name="src" value="sys_attachment.do?sys_id=dd8ad3dbdb892e00813adb9dae961948&amp;view=true" />




<param name="allowfullscreen" value="false" />




<param name="allowscriptaccess" value="sameDomain" />




<embed src="/sys_attachment.do?sys_id=dd8ad3dbdb892e00813adb9dae961948&amp;view=true" type="video/mp4" width="600" height="350" />




</object></p>


As I stated in this post, for security reasons, I would advise against disabling the HTML Sanitizer either globally or on a field-by-field basis and instead edit the script include to granularly whitelist the HTML elements (such as the <iframe> tag) and/or any attributes you don't want sanitized.   This solution maintains a fairly low attack surface vis-í -vis outright disabling the protection.