WLW is modifying addon's output, causing incorrect results on Blogger RRS feed

  • Question

  • I'm trying to hack up the WLWPluginsCollection to show source code on Blogger, and I'm getting incorrect output.  I've built and modified the code to track down the issue as far as I can.

    The root problem is that Blogger takes any newline it sees and turns it into a <BR/> tag.  (This is annoying but probably useful for plain old text posts.)  This shouldn't be so bad; I can always have the plugin return content that doesn't have any newlines where I don't want them, right?  Nope - for some reason WLW inserts spurious newlines between the PRE elements that the plugin returns.

    The plugin returns this to WLW:


    but the WLW HTML view shows that WLW has turned this into


    The result is that when Blogger gets this, it sees the newlines and turns them into <br />, with the final in-blog result being

    <pre>sometext</pre><br /><br /><pre>someothertext</pre>
    Why is WLW modifying the output of the plugin at all?  You can parse it for validity without altering it.  Can we have WLW modified to not touch the output from plugins?
    Friday, June 5, 2009 12:25 AM

All replies

  • There is a setting in Blogger to not convert new lines to <br/>, you might want to try that.  I will have to file a bug to investigate how and why we are editing the html that a plugin returns.
    -Brandon Turner [MSFT]
    Monday, June 8, 2009 2:56 AM
  • Thank you, that would be helpful.  It ought to be possible to use plugins with Blogger's default settings.  If you change the setting to not convert newlines, Blogger's in-browser editor becomes less usable - you have to manually enter <br> tags.

    I admit that Blogger's behavior here is peculiar.  My guess is that the way they have it now allows their API to be used to post arbitrary chunks of markup-free text and get reasonable-looking output.  But you'd think they would have a separate API for posting already-marked-up text.
    Monday, June 8, 2009 6:26 PM