Fixed error message related to escaping curly braces.
This commit is contained in:
parent
071b616178
commit
755d436840
|
|
@ -363,7 +363,7 @@ namespace Microsoft.AspNetCore.Routing
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// In a route parameter, '{' and '}' must be escaped with '{{' and '}}'
|
/// In a route parameter, '{' and '}' must be escaped with '{{' and '}}'.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string TemplateRoute_UnescapedBrace
|
internal static string TemplateRoute_UnescapedBrace
|
||||||
{
|
{
|
||||||
|
|
@ -371,7 +371,7 @@ namespace Microsoft.AspNetCore.Routing
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// In a route parameter, '{' and '}' must be escaped with '{{' and '}}'
|
/// In a route parameter, '{' and '}' must be escaped with '{{' and '}}'.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string FormatTemplateRoute_UnescapedBrace()
|
internal static string FormatTemplateRoute_UnescapedBrace()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@
|
||||||
<value>The constraint entry '{0}' - '{1}' on the route '{2}' could not be resolved by the constraint resolver of type '{3}'.</value>
|
<value>The constraint entry '{0}' - '{1}' on the route '{2}' could not be resolved by the constraint resolver of type '{3}'.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TemplateRoute_UnescapedBrace" xml:space="preserve">
|
<data name="TemplateRoute_UnescapedBrace" xml:space="preserve">
|
||||||
<value>In a route parameter, '{' and '}' must be escaped with '{{' and '}}'</value>
|
<value>In a route parameter, '{' and '}' must be escaped with '{{' and '}}'.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TemplateRoute_OptionalParameterCanbBePrecededByPeriod" xml:space="preserve">
|
<data name="TemplateRoute_OptionalParameterCanbBePrecededByPeriod" xml:space="preserve">
|
||||||
<value>In the segment '{0}', the optional parameter '{1}' is preceded by an invalid segment '{2}'. Only a period (.) can precede an optional parameter.</value>
|
<value>In the segment '{0}', the optional parameter '{1}' is preceded by an invalid segment '{2}'. Only a period (.) can precede an optional parameter.</value>
|
||||||
|
|
|
||||||
|
|
@ -521,7 +521,7 @@ namespace Microsoft.AspNetCore.Routing.Template.Tests
|
||||||
// Act and Assert
|
// Act and Assert
|
||||||
ExceptionAssert.Throws<ArgumentException>(
|
ExceptionAssert.Throws<ArgumentException>(
|
||||||
() => TemplateParser.Parse(template),
|
() => TemplateParser.Parse(template),
|
||||||
"In a route parameter, '{' and '}' must be escaped with '{{' and '}}'" + Environment.NewLine +
|
"In a route parameter, '{' and '}' must be escaped with '{{' and '}}'." + Environment.NewLine +
|
||||||
"Parameter name: routeTemplate");
|
"Parameter name: routeTemplate");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -708,7 +708,7 @@ namespace Microsoft.AspNetCore.Routing.Template.Tests
|
||||||
{
|
{
|
||||||
ExceptionAssert.Throws<ArgumentException>(
|
ExceptionAssert.Throws<ArgumentException>(
|
||||||
() => TemplateParser.Parse("{a}/{a{aa}/{z}"),
|
() => TemplateParser.Parse("{a}/{a{aa}/{z}"),
|
||||||
"In a route parameter, '{' and '}' must be escaped with '{{' and '}}'" + Environment.NewLine +
|
"In a route parameter, '{' and '}' must be escaped with '{{' and '}}'." + Environment.NewLine +
|
||||||
"Parameter name: routeTemplate");
|
"Parameter name: routeTemplate");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue