candidbeachweb Posted December 9, 2020 Share Posted December 9, 2020 Hi, I tried to find a way on how to add HTML description under the video player. I am using hotlinking for video files and when i import videos with Text block i want to add a HTML description ( with link inside) that should appear under the video player. I tried to find a way , read the documentation but could not find a fix for this issue i have. As you can see in the image attached, the html code from description is not recognized. Can you please advise Thank you Quote Link to comment Share on other sites More sharing options...
Tech Support Posted December 10, 2020 Share Posted December 10, 2020 For security reasons all HTML tags are escaped by default, so that users cannot inject harmful code when uploading videos. If your project doesn't allow users to upload videos, you can make video description field support HTML tags by editing Website UI -> Pages -> View Video page -> video_view block template. Find this: <em>{{$data.description|replace:"\n":"<br>"}}</em> Or in older theme version it may look like this: <em>{{$data.description}}</em> Change to this: <em>{{$data.description|replace:"\n":"<br>"|smarty:nodefaults}}</em> Quote Link to comment Share on other sites More sharing options...
candidbeachweb Posted December 10, 2020 Author Share Posted December 10, 2020 Thank you very much! It works! Quote Link to comment Share on other sites More sharing options...
Emilia Posted December 10, 2020 Share Posted December 10, 2020 So, is it possible to allow html for users in the group webmasters? Quote Link to comment Share on other sites More sharing options...
Tech Support Posted December 10, 2020 Share Posted December 10, 2020 It is possible to allow HTML for users as well, but there are 2 notes on that: 1) You should be using HTML Purifier library to filter harmful HTML code. This is supported in KVS, but we don't bundle the library. You should download it yourself and put its files into /admin/include/htmlpurifier directory (without version). Then in template you can use this: {{$data.description|replace:"\n":"<br>"|html_purifier:false|smarty:nodefaults}} It is configured with default settings that should allow removing all harmful code. 2) If you want to enable WYSIWYG editor for users, this is not supported in any KVS theme, so you have to attach them yourself. This should be pretty straightforward by reading theie documentation and it doesn't matter whether the site is KVS, or any other site. 1 Quote Link to comment Share on other sites More sharing options...
Serghei Posted January 13, 2021 Share Posted January 13, 2021 Hi. Where is the best place for this code {{$data.description|html_purifier:false|smarty:nodefaults}}{{$data.description|html_purifier}} for video view page ? I've added this code into video view page code but didnt worked... thanks Quote Link to comment Share on other sites More sharing options...
Tech Support Posted January 14, 2021 Share Posted January 14, 2021 On 1/13/2021 at 7:36 PM, Serghei said: Hi. Where is the best place for this code {{$data.description|html_purifier:false|smarty:nodefaults}} for video view page ? I've added this code into video view page code but didnt worked... thanks Did you download HTML purifier library into /admin/include/htmlpurifier? Quote Link to comment Share on other sites More sharing options...
Serghei Posted January 14, 2021 Share Posted January 14, 2021 15 hours ago, Tech Support said: Did you download HTML purifier library into /admin/include/htmlpurifier? Yes. uploaded on the server into admin/include/htmlpurifier Quote Link to comment Share on other sites More sharing options...
Tech Support Posted January 15, 2021 Share Posted January 15, 2021 8 hours ago, Serghei said: Yes. uploaded on the server into admin/include/htmlpurifier Please contact support team with details. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.