26 lines
677 B
C#
26 lines
677 B
C#
using System;
|
|
using System.Security;
|
|
|
|
namespace MonoGame.Tools.Pipeline
|
|
{
|
|
public static class StringExtensions
|
|
{
|
|
public static string Unescape(this string text)
|
|
{
|
|
if (string.IsNullOrEmpty(text))
|
|
return text;
|
|
|
|
var result = Uri.UnescapeDataString(text);
|
|
|
|
// JCF: XmlReader already does this.
|
|
/*
|
|
result = result.Replace("'", "'");
|
|
result = result.Replace(""", "\"");
|
|
result = result.Replace(">", ">");
|
|
result = result.Replace("&", "&");
|
|
*/
|
|
|
|
return result;
|
|
}
|
|
}
|
|
} |