2 messages in com.googlegroups.bloggerdevATOM with Blogger: How to handle esca...| Subject: | ATOM with Blogger: How to handle escaping![]() |
|---|---|
| From: | Ted (ted....@gmail.com) |
| Date: | 01/14/2006 08:47:01 PM |
| List: | com.googlegroups.bloggerdev |
I have been using the Performancing extension for Firefox to edit my Blogger blog. I noticed that every time I added a post, the post would get an extra "div xmlns" tag around it. This did not seem to be a problem until I started using ecto to do blogging as well.
In ecto, all of those divs show up in the preview as extra spaces. The extra divs wouldn't have bothered me, but once they lost their transparency, they started to get on my nerves.
So I decided to try modifying the Performancing extension to fix this.
Before the extension was using content type text/html in escaped mode for the content. This appears to be the problem. Whenever I even manually submit a request to blogger to add a new post using escaped text/html, the div tag sticks with the post.
So I changed to escaped text/plain and got rid of the div tag all together. This seemed to do the trick for plain text posts, but posts with HTML did not get posted.
So I tried putting a CDATA around the content and the title. That appeared to work, but CSS strings that had things like "10px" would end up as "10" instead.
So I'm really looking for a way to post HTML into a text/plain so that it will work with Blogger. As far as I know, there is no easy way to escape HTML entities in JavaScript like you can do in (for example) PHP. I don't think JavaScript's "escape" is appropriate because things never get unescaped on Blogger's side.
So what do I do?
I know that ecto doesn't have any of these problems, so it seems to know how to work things. How does it work? Does it use a "text/plain" and then use HTML entities like I say here? Or is there some other trick?
In the end, I just want to get rid of that surrounding "div xmlns". If there's some easier way to do that, I'm all ears.
Please help.




