Forums

[resolved] WordPress Stripping Formatting From Incoming RSS (3 posts)

  1. endofradio
    Member
    Posted 3 years ago #

    Hi -
    I am currently in the process of building a site for a client which reads a Blogspot RSS feed and uses the FeedWordPress plugin to automatically convert feed updates into WP posts.
    It's working fine, except that WP is stripping IMG styles from the Blogspot posts it receives. These are applied when uploading images in Blogspot (ie. 'style="float:left" etc). Now, I am aware that inline styles are a "no-no" in design (as is Blogspot itself) but this is one of those situations where the client requires the Blogspot platform for reasons too long to explain and this is the best solution.

    I have:
    1. Turned off the WYSIWYG editor for all users
    2. Turned off the option to correct invalid nested XHTML

    But it is still doing it. I've checked the RSS Feeds and they are outputting the IMG styles, so it is definitely a WP problem.
    Can anyone tell me how to turn this function off?
    Thank you.

  2. Otto
    Tech Ninja
    Posted 3 years ago #

    You should look at the FeedWordPress plugin, as WordPress does not strip inline styles from images in posts.

  3. endofradio
    Member
    Posted 3 years ago #

    Just found the solution in FeedWordPress.php as you said - and there I was knee deep in ksas.php pulling my hair out!

    If anyone else has the problem, just get rid of the line

    var $strip_attrs = array (
    		      array('[a-z]+', 'style'),

    in feedwordpress.php.

    Thanks Otto!

Topic Closed

This topic has been closed to new replies.

About this Topic