Support » Plugin: W3 Total Cache » [Plugin: W3 Total Cache] Minify removes newlines inside CDATA

  • niska

    (@niska)


    I’ve enabled HTML minify. Normally it works fine. But I have a RSS-feed with CDATA. The RSS-feed is located at http://www.mydomain.com/?my_rss

    W3 Total Cache removes newlines inside the CDATA in this RSS-feed.

    I’ve tried enabling “Don’t minify feeds”. And I’ve also disabled “Line break removal”. But none of this actions is helping. The newlines are removed anyway.

    If I disable “HTML Minify settings” the newlines are kept. But I want to use minify for my normal HTML, CSS, and JS-pages. What should I do?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Frederick Townes

    (@fredericktownes)

    Please try the development version available here on wordpress.org.

    niska

    (@niska)

    I’ve tried it now. It still removes newlines.

    I’ve enabled “Don’t minify feeds”
    I’ve disabled “Line break removal”

    As before: When unchecking the “Enable” checkbox the linebreaks are there.

    Plugin Author Frederick Townes

    (@fredericktownes)

    How is that RSS feed implemented?

    niska

    (@niska)

    This is how the feed is created. I’ve validated the feed – and I have several followers.

    The problem is that W3TC doesn’t understand that this is a feed.

    function makerss () {
    	if (isset($_REQUEST['my_rss'])) {
    		require_once(dirname(__FILE__) . '/FeedCreator-1.8.0-dev/feedcreator.class.php');
                    header('Content-type: text/xml; charset=utf-8');
                    $rss = new UniversalFeedCreator();
    		$rss->setEncoding("utf-8");
                    // fill rss with content
                    echo $rss->createFeed("RSS2.0");
    		exit;
    	}
    	// else ignore - normal page
    }
    
    add_action('init', 'makerss');
    niska

    (@niska)

    How does W3TC recoqnize RSS-feeds? Maby I can add something to my output?

    Plugin Author Frederick Townes

    (@fredericktownes)

    Unfortunately there are several ways to create a feed, but that implementation isn’t what I would call “native”, so W3TC sees that as a page if it catches it at all.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: W3 Total Cache] Minify removes newlines inside CDATA’ is closed to new replies.