Thursday, November 26, 2015

Old pet peeve: Blogger uses <BR> tags instead of <P> tags to demarcate paragraphs

I wrote about Blogger’s mad formatting 4 years ago and five years ago. I guess it’s time again. This time I’ll include some screenshots.

My recent ebook DRM post as it appears in MarsEdit:

Screen Shot 2015 11 26 at 11 51 12 AM

The MarsEdit HTML view, each paragraph wrapped in <p>:

Screen Shot 2015 11 26 at 11 52 08 AM

How it looks when viewed as Blogger page:

Screen Shot 2015 11 26 at 11 53 37 AM

Now view source (amazing how much cruft there is in the source):

Screen Shot 2015 11 26 at 11 54 44 AM

Yes, still wrapped in <p>. Now let’s try to edit it using Blogger’s rich text editor. Suddenly the paragraphs are gone

Screen Shot 2015 11 26 at 11 56 14 AM

Blogger HTML view shows all the <p> tags have been replaced by a single <br /> tag:

Screen Shot 2015 11 26 at 11 57 30 AM

This is a very old problem. I think this was configurable in pre-2010 blogger, but it doesn’t seem to be now. I doubt Blogger will ever fix this, I wonder they do this to be consistent with languages that don’t use paragraphs [1].

 There are two things MarsEdit could do to help since Blogger is never going to change:

  1. Provide an option to follow Blogger’s convention and use two <BR> tags instead of one <P> tag when publishing. Do same conversion when bringing back an old post to edit.
  2. Make it easier to edit an old post in MarsEdit — which is probably only possible if there’s some way to send Blogger a current URL and get back a post identifier that the API can work with. Otherwise I assume MarsEdit would need a post identifier like … blogID=5710205 … postID=1945754734324659424

[1] Update: I’m being too kind to Blogger, this really is a bug. If Blogger is replacing <p> tags on an English language blog they should be writing two <br> tags, not one.

1 comment:

Unknown said...

Awesome information and thaks a lot..
Latest govt Jobs