HTML being stripped of Javascript
-
Hello,
I am trying to embed an Eventbrite checkout widget on my page. I have done with on three other pages successfully. We have recently migrated to a new server and updated WP and all plugins. Since the migration, when I paste the code into an HTML block on Elementor and update the page, Elementor/WP is changing my HTML code. It is turning the <script> into a hyperlink. See below for the original code and what it is being changed to. Does anyone have a way to stop WP/Elementor from changing the code?
Original code:
<div id="eventbrite-widget-container-75687396039"></div> <script src="https://www.eventbrite.com/static/widgets/eb_widgets.js"></script> <script type="text/javascript"> var exampleCallback = function() { console.log('Order complete!'); }; window.EBWidgets.createWidget({ // Required widgetType: 'checkout', eventId: '75687396039', iframeContainerId: 'eventbrite-widget-container-75687396039', // Optional iframeContainerHeight: 425, // Widget height in pixels. Defaults to a minimum of 425px if not provided onOrderComplete: exampleCallback // Method called when an order has successfully completed }); </script>What it changes it to when I come back:
<div id="eventbrite-widget-container-75687396039"></div> <a href="https://www.eventbrite.com/static/widgets/eb_widgets.js">https://www.eventbrite.com/static/widgets/eb_widgets.js</a> var exampleCallback = function() { console.log('Order complete!'); }; window.EBWidgets.createWidget({ // Required widgetType: 'checkout', eventId: '75687396039', iframeContainerId: 'eventbrite-widget-container-75687396039', // Optional iframeContainerHeight: 425, // Widget height in pixels. Defaults to a minimum of 425px if not provided onOrderComplete: exampleCallback // Method called when an order has successfully completed });- This topic was modified 6 years, 8 months ago by . Reason: fixing code
- This topic was modified 6 years, 8 months ago by .
The page I need help with: [log in to see the link]
The topic ‘HTML being stripped of Javascript’ is closed to new replies.