Support

Home Forums Event Espresso Premium tags and &'s being replaced in [ESPRESSO_CALENDAR] JavaScript

tags and &'s being replaced in [ESPRESSO_CALENDAR] JavaScript

Posted: June 24, 2013 at 10:34 am

Viewing 5 reply threads


Inventory Purchasing

June 24, 2013 at 10:34 am

I recently updated the Calendar plugin on a site I’m working on: http://50.28.54.34/~apactpip/calendar/

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.

Any idea on what’s going on?


Josh

  • Support Staff

June 24, 2013 at 12:10 pm

Hi there,

This is something that will typically get added by means of a function within the active WP theme that disables the WordPress autoP feature.

Sometimes the following solution will work: Can you try wrapping the shortcode on the calendar page with the [raw] short tag?

It will look like this:
[raw][ESPRESSO_CALENDAR][/raw]


Inventory Purchasing

June 24, 2013 at 3:29 pm

No Dice.  Wordpress is ignoring the raw shortcode for some reason?


Inventory Purchasing

June 24, 2013 at 3:32 pm

Added the raw shortcode manually through this link: http://css-tricks.com/snippets/wordpress/disable-automatic-formatting-using-a-shortcode/

 

That works, but it doesn’t take care of the ampersand issue, they’re still being converted to their entity reference.


Inventory Purchasing

June 24, 2013 at 3:42 pm

Was able to get it to work with the Raw HTML plugin: http://wordpress.org/plugins/raw-html/

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.


Josh

  • Support Staff

June 24, 2013 at 3:43 pm

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:

https://eventespresso.com/wiki/calendar/#troubleshooting

Viewing 5 reply threads

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.

Event Espresso