Fixed possible issue occurring when multiple namespaces are added to the URL (e.h. Help.Customize.MainPage).
This commit is contained in:
parent
9e9ceb2ec7
commit
e37abcf39f
3 changed files with 8 additions and 4 deletions
|
@ -16,5 +16,5 @@ using System.Reflection;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("3.0.1.411")]
|
[assembly: AssemblyVersion("3.0.1.412")]
|
||||||
[assembly: AssemblyFileVersion("3.0.1.411")]
|
[assembly: AssemblyFileVersion("3.0.1.412")]
|
||||||
|
|
|
@ -317,7 +317,11 @@ namespace ScrewTurn.Wiki {
|
||||||
/// <param name="input">The input string.</param>
|
/// <param name="input">The input string.</param>
|
||||||
/// <returns>The encoded string.</returns>
|
/// <returns>The encoded string.</returns>
|
||||||
public static string UrlEncode(string input) {
|
public static string UrlEncode(string input) {
|
||||||
return HttpContext.Current.Server.UrlEncode(input).Replace("+", "%20");
|
if(HttpContext.Current != null && HttpContext.Current.Server != null) return HttpContext.Current.Server.UrlEncode(input).Replace("+", "%20");
|
||||||
|
else {
|
||||||
|
Log.LogEntry("HttpContext.Current or HttpContext.Current.Server were null (Tools.UrlEncode)", EntryType.Warning, Log.SystemUsername);
|
||||||
|
return input;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace ScrewTurn.Wiki {
|
||||||
if(ext != "ashx" && ext != "aspx") return;
|
if(ext != "ashx" && ext != "aspx") return;
|
||||||
|
|
||||||
// Extract the current namespace, if any
|
// Extract the current namespace, if any
|
||||||
string nspace = GetCurrentNamespace();
|
string nspace = GetCurrentNamespace() + "";
|
||||||
if(!string.IsNullOrEmpty(nspace)) pageName = pageName.Substring(nspace.Length + 1); // Trim Namespace. from pageName
|
if(!string.IsNullOrEmpty(nspace)) pageName = pageName.Substring(nspace.Length + 1); // Trim Namespace. from pageName
|
||||||
|
|
||||||
string queryString = ""; // Empty or begins with ampersand, not question mark
|
string queryString = ""; // Empty or begins with ampersand, not question mark
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue