diff --git a/samples/StatusCodePagesSample/Startup.cs b/samples/StatusCodePagesSample/Startup.cs index dbe85fa3f4..2c81bb949b 100644 --- a/samples/StatusCodePagesSample/Startup.cs +++ b/samples/StatusCodePagesSample/Startup.cs @@ -42,7 +42,10 @@ namespace StatusCodePagesSample var builder = new StringBuilder(); builder.AppendLine(""); - builder.AppendLine("" + context.Request.PathBase + "/missingpage/
"); + builder.AppendLine("" + + WebUtility.HtmlEncode(context.Request.PathBase.ToString()) + "/missingpage/
"); + for (int statusCode = 400; statusCode < 600; statusCode++) { builder.AppendLine("" + statusCode + "
"); diff --git a/src/Microsoft.AspNet.Diagnostics/StatusCodePagesExtensions.cs b/src/Microsoft.AspNet.Diagnostics/StatusCodePagesExtensions.cs index 0656c5b525..42c41a353a 100644 --- a/src/Microsoft.AspNet.Diagnostics/StatusCodePagesExtensions.cs +++ b/src/Microsoft.AspNet.Diagnostics/StatusCodePagesExtensions.cs @@ -52,9 +52,9 @@ namespace Microsoft.AspNet.Builder } /// - /// Specifies that responses should be handled by redirecting with the given location url template. - /// This may include a '{0}' placeholder for the status code. Ulrs starting with '~' will have PathBase prepeneded, - /// where any other url will be used as is. + /// Specifies that responses should be handled by redirecting with the given location URL template. + /// This may include a '{0}' placeholder for the status code. URLs starting with '~' will have PathBase prepended, + /// where any other URL will be used as is. /// /// /// diff --git a/src/Microsoft.AspNet.Diagnostics/StatusCodePagesOptions.cs b/src/Microsoft.AspNet.Diagnostics/StatusCodePagesOptions.cs index 6a3ee7de16..242ab5b96d 100644 --- a/src/Microsoft.AspNet.Diagnostics/StatusCodePagesOptions.cs +++ b/src/Microsoft.AspNet.Diagnostics/StatusCodePagesOptions.cs @@ -9,6 +9,9 @@ using Microsoft.AspNet.WebUtilities; namespace Microsoft.AspNet.Diagnostics { + /// + /// Options for StatusCodePagesMiddleware. + /// public class StatusCodePagesOptions { public StatusCodePagesOptions()