/r:$(corlib) \
/r:System.dll \
/r:System.Core.dll \
- /r:System.Web \
- /r:System.Web.Services \
- /r:System.Xml.dll \
- /r:System.Configuration.dll
+ /r:System.Configuration.dll \
+ /r:System.Web.Services.dll \
+ /r:System.Xml.dll
include ../../build/library.make
public static string GetCachedFileName (string cacheDir, string url)
{
return Path.Combine (cacheDir,
- HttpUtility.UrlEncode (url).Replace ('/', '+').Replace ("*", "%2a"));
+ Uri.EscapeUriString (url).Replace ('/', '+').Replace ("*", "%2a"));
}
}
}
public static string FormatEditUri (string document_identifier, string xpath)
{
- return String.Format ("edit:{0}@{1}", HttpUtility.UrlEncode (document_identifier),
- HttpUtility.UrlEncode (xpath));
+ return String.Format ("edit:{0}@{1}", Uri.EscapeUriString (document_identifier),
+ Uri.EscapeUriString (xpath));
}
public static string GetXPath (XPathNavigator n)
if (parts.Length != 2)
throw new Exception (String.Format ("invalid editing url {0}", parts.Length));
- string xp = HttpUtility.UrlDecode (parts [1]);
- parts = HttpUtility.UrlDecode (parts [0]).Substring ("edit:".Length).Split ('@');
+ string xp = Uri.UnescapeDataString (parts [1]);
+ parts = Uri.UnescapeDataString (parts [0]).Substring ("edit:".Length).Split ('@');
if (parts.Length == 1) {
string p = parts[0];
parts = new string[2];
{
if (nozip) {
Stream s = File.OpenRead (XmlDocUtils.GetCachedFileName (base_dir, id));
- string url = "monodoc:///" + SourceID + "@" + System.Web.HttpUtility.UrlEncode (id) + "@";
+ string url = "monodoc:///" + SourceID + "@" + Uri.EscapeUriString (id) + "@";
return new XmlTextReader (url, s);
}
ZipEntry entry = zip_file.GetEntry (id);
if (entry != null) {
Stream s = zip_file.GetInputStream (entry);
- string url = "monodoc:///" + SourceID + "@" + System.Web.HttpUtility.UrlEncode (id) + "@";
+ string url = "monodoc:///" + SourceID + "@" + Uri.EscapeUriString (id) + "@";
return new XmlTextReader (url, s);
}
return null;
{
if (nozip) {
Stream s = File.OpenRead (XmlDocUtils.GetCachedFileName (base_dir, id));
- string url = "monodoc:///" + SourceID + "@" + System.Web.HttpUtility.UrlEncode (id) + "@";
+ string url = "monodoc:///" + SourceID + "@" + Uri.EscapeUriString (id) + "@";
XmlReader r = new XmlTextReader (url, s);
XmlDocument ret = new XmlDocument ();
ret.Load (r);
ZipEntry entry = zip_file.GetEntry (id);
if (entry != null) {
Stream s = zip_file.GetInputStream (entry);
- string url = "monodoc:///" + SourceID + "@" + System.Web.HttpUtility.UrlEncode (id) + "@";
+ string url = "monodoc:///" + SourceID + "@" + Uri.EscapeUriString (id) + "@";
XmlReader r = new XmlTextReader (url, s);
XmlDocument ret = new XmlDocument ();
ret.Load (r);