WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: All-in-One Event Calendar] Filter HTML tags and wpautop

[Resolved] [Plugin: All-in-One Event Calendar] Filter HTML tags and wpautop

  • Using ai1ec version 1.2.5 and 1.3

    When I import/subscribe calendars into thunderbird lightning the event descriptions still contain all HTML tags. And – additionally – all paragraphs are wrapped in <p></p>.

    Linebreaks are still correctly escaped with \n .

    I think most (mobile) calendar tools don’t render HTML in event description so I was looking for way to export just plain text.

    My solution:

    In file class-ai1ec-exporter-helper.php
    in wp-content/plugins/all-in-one-event-calendar/app/helper/
    after line 68

    # No wrapping <p></p> in event description
    		if( $export ) {
    			remove_filter( 'the_content', 'wpautop', 10 );
    		}
    		$content = apply_filters( 'the_content', $event->post->post_content );
    		# No HTML code in event description
    		if( $export ) {
    			$content = strip_tags($content);
    		}

    Or is there any better way doing this (or did I miss some settings)?

    Cheers
    Ulle

    P.S.: How do I search in posts tagged by “all-in-one-event-calendar” (forumid=10) only?

    http://wordpress.org/extend/plugins/all-in-one-event-calendar/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I just checked in release candidate (1) for 1.8:
    This issue, that all paragraphs in event description are wrapped in <p></p>, is still not fixed, neither in free and premium.

    Most programs showing those events (like Thunderbird Lighnting plugin) don’t render HTML and thus display the description with these <p> beasties.

    Hope the simple solution with remove_filter() or any other way solving the issue will finally make it into final 1.8

    Cheers,
    Ulle

    Richard

    @richardgirling

    Hi ullemehner,

    Thank you for bringing this to our attention. I will forward this suggestion to the dev team and add it to our “feature suggestion” list for future releases.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: All-in-One Event Calendar] Filter HTML tags and wpautop’ is closed to new replies.