Users unable to embed videos into Knowledge Articles

toddpreece
Giga Expert

It seems as though there is no end to the number of questions here around how to embed a video into a Knowledge Article. I've used most of them to successfully get it to work but currently its only working for admin level users. Here's what I've currently done as context. Set the sys_property to:

  1. glide.html.sanitize_all_fields to false
  2. glide.ui.attachment.force_download_all_mime_types = false
  3. glide.knowman.use_document_viewer = true

The above allows me to successfully take some youtube embed code and add it into a Knowledge article with no issue

(e.g. <iframe width="560" height="315" src="https://www.youtube.com/embed/kfQunML-N0E" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>)

However, this does not work for other users or knowledge managers. What they experience:

  1. Hit the < > button find_real_file.png
  2. Add embed code (such as above)
  3. Article successfully previews the video
  4. Hit save
  5. Video and code is removed.

I'm assuming this is some sort of permissions issue but not sure where to start.

 

 

 

 

1 ACCEPTED SOLUTION

toddpreece
Giga Expert

OK found the answer which doesn't seem to be in any of the other articles on this subject.

The ability to allow embed code into a Knowledge Article seems to be controlled almost exclusively (in London at least) by:

  • System Definiton -> Dictionary
  • Table = kb_knowledge, Field = text
  • Click the advanced view link
  • Set Attributes = serializer=com.glide.script.TranslatedTextXMLSerializer,html_sanitize=false

Adding the ",html_sanitize=false" string at the end solved the whole issue

May be worth noting that urning off the glide.html.sanitize_all_fields system property does not actually do anything in this case. The above works even if the system property is made active again.

 

View solution in original post

6 REPLIES 6

sachin_namjoshi
Kilo Patron
Kilo Patron

Please check below to add videos to knowledge articles.

 

https://www.servicenowguru.com/knowledge-management/adding-video-knowledge-articles/

 

Regards,

Sachin

Read that an several others. Doesn't really address the use case I'm running into right now. I'm not attaching a video, more linking to an external source (e.g. youtube).

toddpreece
Giga Expert

OK found the answer which doesn't seem to be in any of the other articles on this subject.

The ability to allow embed code into a Knowledge Article seems to be controlled almost exclusively (in London at least) by:

  • System Definiton -> Dictionary
  • Table = kb_knowledge, Field = text
  • Click the advanced view link
  • Set Attributes = serializer=com.glide.script.TranslatedTextXMLSerializer,html_sanitize=false

Adding the ",html_sanitize=false" string at the end solved the whole issue

May be worth noting that urning off the glide.html.sanitize_all_fields system property does not actually do anything in this case. The above works even if the system property is made active again.

 

Thank you for this - it really helped!

 

There were a couple slight differences in my personal Dev instance, so I will show them here in case it is helpful to anyone:

 

  • System Definiton -> Dictionary
  • Table = kb_knowledge
  • Find the one with Column Name = text
  • Click the advanced view link
  • Set Attributes - could look like either of these, just add the portion in yellow:
    • serializer=com.glide.script.TranslatedTextXMLSerializer,html_sanitize=false
    • serializer=com.glide.script.TranslatedTextXMLSerializer,edge_encryption_enabled=true,html_sanitize=false

 

find_real_file.png