Ebeo / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

Potential double unescaping of blogger content in gdata api? #471

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
As reported on BloggerDev: 
https://groups.google.com/group/bloggerdev/browse_thread/thread/913cd720b5247873

User has a blog that includes source code with angle brackets in it. I have 
confirmed that the underlying GData feed has his angle brackets escaped, yet 
when he retrieves it using our .Net libraries, it isn't working out. Here is 
the vb code that he is using:

Imports Google.GData.Client 
Module Module1 
    Sub Main() 
        Dim thisService As Service = New Service("blogger", 
"RobFine.com") 
        thisService.Credentials = New GDataCredentials("MYUSERNAME", 
"MYPASSWORD") 
        Dim thisFactory As GDataGAuthRequestFactory = 
CType(thisService.RequestFactory, GDataGAuthRequestFactory) 
        thisFactory.AccountType = "GOOGLE" 
        Dim query As New Google.GData.Client.FeedQuery() 
        query.Uri = New Uri("http://www.blogger.com/feeds/ 
3834455919215962619/posts/default/5777934424638844396") 
        Dim feed As Google.GData.Client.AtomFeed = 
thisService.Query(query) 
        For Each thisEntry As AtomEntry In feed.Entries 
            System.Console.WriteLine(thisEntry.Title.Text) 
            System.Console.WriteLine() 
System.Console.WriteLine(thisEntry.Content.Content.Replace("<br />", 
vbCrLf)) 
            System.Console.WriteLine() 
        Next 
        System.Console.ReadLine() 
    End Sub 
End Module 

As a further example, here is that same entry shown on blogspot: 
http://atlantawebsites.blogspot.com/2011/01/pay-no-attention-to-man-behind-curta
in.html

And that same entry shown after being pulled through the .NET GData 
API: 
http://www.robfine.com/aspnet/Paynoattentiontothemanbehindthecurtain 

Original issue reported on code.google.com by brettmor...@google.com on 22 Jan 2011 at 1:34

GoogleCodeExporter commented 8 years ago

Original comment by ccherub...@google.com on 30 Jan 2011 at 8:31