optimize ParseParameters to use native Uri class
This commit is contained in:
@ -384,9 +384,7 @@
|
||||
_path = _name;
|
||||
}
|
||||
|
||||
var fragment = (_path.Contains("?")) ? _path.Substring(_path.IndexOf("?")) : "";
|
||||
fragment = (_path.Contains("#")) ? _path.Substring(_path.IndexOf("#")) : "";
|
||||
_path = (!string.IsNullOrEmpty(fragment)) ? _path.Replace(fragment, "") : _path;
|
||||
(_path, string parameters) = Utilities.ParsePath(_path);
|
||||
|
||||
if (_path.Contains("/"))
|
||||
{
|
||||
@ -412,7 +410,7 @@
|
||||
page.Path = parent.Path + "/" + Utilities.GetFriendlyUrl(_path);
|
||||
}
|
||||
}
|
||||
page.Path += fragment;
|
||||
page.Path += parameters;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -526,9 +526,7 @@
|
||||
_path = _name;
|
||||
}
|
||||
|
||||
var fragment = (_path.Contains("?")) ? _path.Substring(_path.IndexOf("?")) : "";
|
||||
fragment = (_path.Contains("#")) ? _path.Substring(_path.IndexOf("#")) : "";
|
||||
_path = (!string.IsNullOrEmpty(fragment)) ? _path.Replace(fragment, "") : _path;
|
||||
(_path, string parameters) = Utilities.ParsePath(_path);
|
||||
|
||||
if (_path.Contains("/"))
|
||||
{
|
||||
@ -554,7 +552,7 @@
|
||||
_page.Path = parent.Path + "/" + Utilities.GetFriendlyUrl(_path);
|
||||
}
|
||||
}
|
||||
_page.Path += fragment;
|
||||
_page.Path += parameters;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user