Sue Busher Posted September 22, 2016 Share Posted September 22, 2016 Hi I've found a great site for managing events more effectively but when I try to embedd the code into HTML widget it is blank. I suspect it needs additional code around it for it to work. Would someone be able to advise please? Code is: <div data-tockify-component="calendar" data-tockify-calendar="events.kennet"></div> <script data-tockify-script="embed" src="https://public.tockify.com/browser/embed.js"></script> Thanks in advance Link to comment Share on other sites More sharing options...
Chris.Smith Posted September 22, 2016 Share Posted September 22, 2016 Hi Sue, This won't be working as to prevent Cross Site Scripting attacks, we actively remove <script> tags from the HTML Widget; there is of course a way around this. <div data-tockify-component="calendar" data-tockify-calendar="events.kennet"></div> <script> var $script = $(document.createElement('script')); $script.attr('data-tockify-script', 'embed') .attr('src', 'https://public.tockify.com/browser/embed.js'); this.element.append($script); </script> Here we are manually creating the script element. We have to do this, as the HTML Widget uses a regex which removes instances of '<script>' and '</script>'. This is also why we can't use jQuery to create the element for us. Hope this helps ~ Chris 1 Link to comment Share on other sites More sharing options...
Sue Busher Posted September 22, 2016 Author Share Posted September 22, 2016 Thanks Chris. Appreciate the response. Hope you are well. Sue Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now