I’m now getting weird issues with the Shortcode, it’s wrapping many of the JS statements in Paragraph tags and converted Ampersands into their entity reference so removing the wpautop filter doesn’t fix the issue.
On another note, why is this JS being added to the page directly, why not have the shortcode pull an external JS file from the plugin directory and spit out the markup as HTML? This seems like best practice not only to avoid issues like these but to leverage the browser cached JS.
Please remove the raw shortcode code snippet, you will end up creating more problems than solving any with the raw shortcode code. The above suggestion to wrap the shortcode in [raw] shorttags will usually work if the theme is already adding it, but we don’t want to create more problems for you.
In this case, the theme or another plugin is adding its formatting that’s adding the p tags and ampersands. You can rule out if it’s a theme by temporarily switching to the default WP theme and for plugins by temporarily deactivating other WP plugins.
One other solution that may help here is to create a page template just for the calendar page. This will work around what ever is getting added to the_content filter, because you’ll end up calling the Calendar shortcode outside of the_content:
The support post ‘tags and &'s being replaced in [ESPRESSO_CALENDAR] JavaScript’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.