Blogger: too many <br> tags while using <pre> tag RRS feed

  • Question

  • Hi there,

    not sure if this is a known issue but I experience the following while using WLW 14.0.8050.1202:

    As soon as I use a pre tag in my posts I get after publishing lots of br tags in the posting. Any idea how this can be avoided?

    I'm no sure if this is a WLW or a Blogger issue.
    Here's an example. Please take a look, it starts after the first pre and you can see how the distance between the paragraphs gets larger and larger to the end ...

    Thanks, Mario
    Monday, February 2, 2009 8:08 PM

All replies

  • Any Blogger user out there? Maybe you know a workaround?

    I could go to Blogger's post editor and try to change the layout manually but this will usually create more damage because it destroys the code fragments ptting all the HTML examples into one line.
    Tuesday, February 3, 2009 7:47 AM
  • Sorry, this is a Blogger issue--they indiscriminately put in <br> every time they see a hard return. In order to avoid this normally, we strip out hard returns everywhere in the HTML, except in <pre> tags where they are significant.

    What are you using <pre> for? If it's for putting source code in your post, you may have better luck with one of the source code insertion plugins in our gallery.
    Tuesday, February 3, 2009 4:25 PM
  • Hi Joe,

    thanks for your response!
    1) I use <pre> because I defined a CSS box with scrollbars as in my example. If I change this to something different I need to rework all my old posts, I guess.
    2) hard return - what tag is it? <p> or <br>?
    3) Your gallery link redirects me to the German live gallery which is obviously empty and does not offer any plugins. Is there a direct English link available?

    It seems I need to use the Blogger Post Editor to delete those <br> tags. I will do some testing to find a method with low impact.

    Cheers, Mario
    Tuesday, February 3, 2009 6:05 PM
  • A hard return is not a tag--it's just what happens when you hit Enter, you go to a new line.

    My understanding of the problem is that we send this:


    And Blogger converts it to this:

    <pre>One<br />

    We don't have any control over whether they do this to us or not. However, you may be able to affect this behavior by going to your Blogger control panel, under Formatting, and change "Convert line breaks" to No. After doing this, check to make sure your older posts are not adversely affected.

    Here's a link to the US version of the gallery:

    Sorry for the inconvenience.
    Wednesday, February 4, 2009 7:09 AM
  • Thank you very much for your help and the link.

    One last comment on the <pre> tag.
    In your example they add the <br> tags within the <pre> tag. This might be the case but it does not destroy the layout of the pre section.

    But after the first pre section (meaning after the first </pre>) the start to put additional <br> after any <br> which was the result of the hard return conversion.

    In my example of the first post I corrected it manually in the meantime. But it's annoying, nevertheless this needs to be adressed by the Blogger people.

    I will do some more testing as soon as I have some time ;-)
    Wednesday, February 4, 2009 8:12 AM
  • I had the same issue. I solved it by setting this setting in blogger:

    Settings > Formatting > Convert Line Breaks change the setting from the default “Yes” to “No”.

    I hope it helps.

    Thursday, August 5, 2010 3:23 PM