Fix bug #612191, patch by Carlos Martin.
authorAtsushi Eno <atsushieno@gmail.com>
Mon, 14 Jun 2010 06:20:36 +0000 (06:20 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Mon, 14 Jun 2010 06:20:36 +0000 (06:20 -0000)
svn path=/trunk/mcs/; revision=158865

mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/ChangeLog
mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/Rss20ItemFormatter.cs

index 0927cd8d488d5a5634b5dbb50073c5c146b0d244..5337f5244275926f0cbc5ae4222abe39cc97c89f 100644 (file)
@@ -1,3 +1,7 @@
+2010-06-07  Carlos Martin Nieto  <carlos@cmartin.tk>
+
+       * Rss20ItemFormatter.cs: Don't assume guids are permalinks
+
 2009-12-01  Atsushi Enomoto  <atsushi@ximian.com>
 
        * Atom10ItemFormatter.cs, Atom10FeedFormatter.cs :
index a1c4ba651b6e7dbbde7d7b10f077129215b1f477..3b83b390a827c622747adfb35b51a5c8741f99d6 100644 (file)
@@ -203,7 +203,10 @@ namespace System.ServiceModel.Syndication
                                                Item.Links.Add (l);
                                                continue;
                                        case "guid":
-                                               Item.AddPermalink (CreateUri (reader.ReadElementContentAsString ()));
+                                               if (reader.GetAttribute ("isPermaLink") == "true")
+                                                       Item.AddPermalink (CreateUri (reader.ReadElementContentAsString ()));
+                                               else
+                                                       Item.Id = reader.ReadElementContentAsString ();
                                                continue;
                                        case "pubDate":
                                                // FIXME: somehow DateTimeOffset causes the runtime crash.