diff --git a/Xwt/Xwt/FormattedText.cs b/Xwt/Xwt/FormattedText.cs index c4f040733..f1120f48b 100644 --- a/Xwt/Xwt/FormattedText.cs +++ b/Xwt/Xwt/FormattedText.cs @@ -28,6 +28,7 @@ using Xwt.Drawing; using System.Text; using System.Globalization; +using System.Net; namespace Xwt { @@ -62,7 +63,7 @@ void ParseMarkup (string markup) int last = 0; int i = markup.IndexOf ('<'); while (i != -1) { - sb.Append (markup, last, i - last); + sb.Append (WebUtility.HtmlDecode (markup.Substring (last, i - last))); if (PushSpan (formatStack, markup, sb.Length, ref i)) { last = i; i = markup.IndexOf ('<', i); @@ -76,7 +77,7 @@ void ParseMarkup (string markup) last = i; i = markup.IndexOf ('<', i + 1); } - sb.Append (markup, last, markup.Length - last); + sb.Append (WebUtility.HtmlDecode (markup.Substring (last, markup.Length - last))); Text = sb.ToString (); }