Hi Team,
We get an error when we try to implement the Custom Code of the widget on our site through EpiServer CMS (Version 6).
We want to implement this widget on the right-hand side of the page we’re trying to display the Met office weather warning widget.
The code for the widget from the met office website is:
<p><a class="metoffice-warning-widget" href="http://www.metoffice.gov.uk/public/weather/warnings/">Weather warnings</a><script type="text/javascript"> moWarnWidgetParams="?size=large&height=445&zoom=5&tab=map&theme=dark&border=black&lang=en&domain=www.metoffice.gov.uk&"; </script><script type="text/javascript" src="http://www.metoffice.gov.uk/public/pws/components/warning/loader.js"></script>
<p>
<a href="http://www.metoffice.gov.uk/public/weather/warnings" target="_blank">Weather warnings</a> generated by the <a href='http://www.metoffice.gov.uk/public/weather/components'>Met Office Weather Widget</a></p>
Once we paste the code into the html editor on the composer block, it adds a //[![CDATA]]// tag around the <script></script> part of the widget and stops it from displaying:
<p><a class="metoffice-warning-widget" href="http://www.metoffice.gov.uk/public/weather/warnings/">Weather warnings</a>
<script type="text/javascript">// <![CDATA[
moWarnWidgetParams="?
size=large&height=445&zoom=5&tab=map&theme=dark&border=black&lang=en&domain=www.metoffice.gov.uk&"
// ]]></script>
<script src="http://www.metoffice.gov.uk/public/pws/components/warning/loader.js" type="text/javascript"></script>
</p>
<p><a href="http://www.metoffice.gov.uk/public/weather/warnings" target="_blank">Weather warnings</a> generated by the <a href="http://www.metoffice.gov.uk/public/weather/components">Met Office Weather Widget</a></p>
Why is this happening and what can we do to get this showing?
Thanks,
Vaibhav Nadpurohit