Rendering CMS Paragraph component content and script in Spartacus

105 Views Asked by At

I have Created Spartacus Angular project with version 6.3.0 and I have added html content and inline scripts inside paragraph component in SmartEdit. While loading the page in browser I am seeing this error in console like below and inline script is not able to load and execute.

WARNING: sanitizing HTML stripped some content, see https://g.co/ng/security#xss

If anyone knows please let me know how to load and execute inline script in Spartacus application. whether I need to add any configuration .

1

There are 1 best solutions below

0
ravi chadda On

we are using JavaScript and Jquery libraries Like Slick.JS etc. in HTML using paragraph component. CSS is working fine but JavaScript is not working.

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick-theme.min.css">
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>