From c7ed6013c8e2ddc3e30982faf7da1857bb044b78 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Thu, 1 Dec 2011 11:26:19 -0800 Subject: [PATCH] #17785: Fixing title encoding in Live Writer Work Item: 17785 --HG-- branch : 1.x --- .../Modules/Orchard.Blogs/Services/XmlRpcHandler.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs index 320aad7b0..178eb26b9 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Web; using System.Web.Mvc; using System.Web.Routing; using System.Xml.Linq; @@ -207,7 +208,7 @@ namespace Orchard.Blogs.Services { //RoutePart if (blogPost.Is()) { - blogPost.As().Title = title; + blogPost.As().Title = HttpUtility.HtmlDecode(title); blogPost.As().Slug = slug; _routableService.FillSlugFromTitle(blogPost.As()); blogPost.As().Path = blogPost.As().GetPathWithSlug(blogPost.As().Slug); @@ -274,7 +275,7 @@ namespace Orchard.Blogs.Services { //RoutePart if (blogPost.Is()) { - blogPost.As().Title = title; + blogPost.As().Title = HttpUtility.HtmlDecode(title); blogPost.As().Slug = slug; _routableService.FillSlugFromTitle(blogPost.As()); blogPost.As().Path = blogPost.As().GetPathWithSlug(blogPost.As().Slug); @@ -331,7 +332,7 @@ namespace Orchard.Blogs.Services { var blogStruct = new XRpcStruct() .Set("postid", blogPostPart.Id) - .Set("title", blogPostPart.Title) + .Set("title", HttpUtility.HtmlEncode(blogPostPart.Title)) .Set("wp_slug", blogPostPart.Slug) .Set("description", blogPostPart.Text) .Set("link", url)