List Info

Thread: Incorrect encoding of '>' causes problems with CDATA sections




Incorrect encoding of '>' causes problems with CDATA sections
user name
2006-08-31 19:33:42
Hi,

It seems that '>' is not being encoded to > in
HTML content,
although '<' is being correctly encoded to &lt;.
Although you can
sometimes get away with this, if the text contains a CDATA
section,
and then all hell breaks loose! 

For an example, see this blog entry:

  <http://internet-apps.blogsp
ot.com/2005/11/xforms-flickrbar-and-flickr-strips.html>

Search for "CDATA" and you'll see that the blog
entry contains some
JavaScript source code, which is wrapped in a CDATA section.
It
renders ok, but when I retrieve the feed:

  <
http://beta.blogger.com/feeds/8029070/posts/full>

any XML processor will see the closing part of the CDATA
section
("]]>") and decide that the entire document
is badly formed, since it
didn't see an opening part.

You could just encode this as "]]&gt;", but
I don't see what is saved
by not encoding all '>'s, and then this problem would
just 'fall out'
as a consequence.

Regards,

Mark

-- 
Mark Birbeck
CEO
x-port.net Ltd.

e: Mark.Birbeckx-port.net
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.co
m/
b: http://internet-ap
ps.blogspot.com/

Download our XForms processor from
http://www.formsPlayer.co
m/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Blogger Data API" group.
To post to this group, send email to bloggerDevgooglegroups.com
To unsubscribe from this group, send email to
bloggerDev-unsubscribegooglegroups.com
For more options, visit this group at http://grou
ps.google.com/group/bloggerDev
-~----------~----~----~----~------~----~------~--~---

Incorrect encoding of '>' causes problems with CDATA sections
user name
2006-09-01 16:47:39
Hi Mark, thank you for bringing this to our attention! I
verified the
issue and am able to see the XML parsing error in Firefox.
We're
working on a fix.

For anyone else listening, a direct link to Mark's posting
is below

http://beta.blogger.com/feeds/8029070/posts/f
ull/113163032276185353

Jussi


Mark Birbeck wrote:
> Hi,
>
> It seems that '>' is not being encoded to &gt;
in HTML content,
> although '<' is being correctly encoded to
&lt;. Although you can
> sometimes get away with this, if the text contains a
CDATA section,
> and then all hell breaks loose! 
>
> For an example, see this blog entry:
>
>   <http://internet-apps.blogsp
ot.com/2005/11/xforms-flickrbar-and-flickr-strips.html>
>
> Search for "CDATA" and you'll see that the
blog entry contains some
> JavaScript source code, which is wrapped in a CDATA
section. It
> renders ok, but when I retrieve the feed:
>
>   <
http://beta.blogger.com/feeds/8029070/posts/full>
>
> any XML processor will see the closing part of the
CDATA section
> ("]]>") and decide that the entire
document is badly formed, since it
> didn't see an opening part.
>
> You could just encode this as "]]&gt;",
but I don't see what is saved
> by not encoding all '>'s, and then this problem
would just 'fall out'
> as a consequence.
>
> Regards,
>
> Mark
>
> --
> Mark Birbeck
> CEO
> x-port.net Ltd.
>
> e: Mark.Birbeckx-port.net
> t: +44 (0) 20 7689 9232
> w: http://www.formsPlayer.co
m/
> b: http://internet-ap
ps.blogspot.com/
> 
> Download our XForms processor from
> http://www.formsPlayer.co
m/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Blogger Data API" group.
To post to this group, send email to bloggerDevgooglegroups.com
To unsubscribe from this group, send email to
bloggerDev-unsubscribegooglegroups.com
For more options, visit this group at http://grou
ps.google.com/group/bloggerDev
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )