Reacting to AppendFormat changes in Razor.
This commit is contained in:
parent
0c0fa10ed0
commit
7e2420b93c
|
|
@ -292,22 +292,22 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
|
||||||
builder.Append(Environment.NewLine);
|
builder.Append(Environment.NewLine);
|
||||||
|
|
||||||
// Build the <meta /> tag that's used to test for the presence of the stylesheet
|
// Build the <meta /> tag that's used to test for the presence of the stylesheet
|
||||||
builder.Append(string.Format(
|
builder.AppendFormat(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
"<meta name=\"x-stylesheet-fallback-test\" class=\"{0}\" />",
|
"<meta name=\"x-stylesheet-fallback-test\" class=\"{0}\" />",
|
||||||
HtmlEncoder.HtmlEncode(FallbackTestClass)));
|
HtmlEncoder.HtmlEncode(FallbackTestClass));
|
||||||
|
|
||||||
// Build the <script /> tag that checks the effective style of <meta /> tag above and renders the extra
|
// Build the <script /> tag that checks the effective style of <meta /> tag above and renders the extra
|
||||||
// <link /> tag to load the fallback stylesheet if the test CSS property value is found to be false,
|
// <link /> tag to load the fallback stylesheet if the test CSS property value is found to be false,
|
||||||
// indicating that the primary stylesheet failed to load.
|
// indicating that the primary stylesheet failed to load.
|
||||||
builder
|
builder
|
||||||
.Append("<script>")
|
.Append("<script>")
|
||||||
.Append(string.Format(
|
.AppendFormat(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
JavaScriptResources.GetEmbeddedJavaScript(FallbackJavaScriptResourceName),
|
JavaScriptResources.GetEmbeddedJavaScript(FallbackJavaScriptResourceName),
|
||||||
JavaScriptEncoder.JavaScriptStringEncode(FallbackTestProperty),
|
JavaScriptEncoder.JavaScriptStringEncode(FallbackTestProperty),
|
||||||
JavaScriptEncoder.JavaScriptStringEncode(FallbackTestValue),
|
JavaScriptEncoder.JavaScriptStringEncode(FallbackTestValue),
|
||||||
JavaScriptStringArrayEncoder.Encode(JavaScriptEncoder, fallbackHrefs)))
|
JavaScriptStringArrayEncoder.Encode(JavaScriptEncoder, fallbackHrefs))
|
||||||
.Append("</script>");
|
.Append("</script>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue