cr feedback

This commit is contained in:
Ryan Nowak 2014-09-18 12:40:15 -07:00
parent 1916560546
commit fe0a9331d2
1 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ namespace Microsoft.AspNet.Mvc.Razor
/// <param name="value">The <see cref="string"/> to write.</param> /// <param name="value">The <see cref="string"/> to write.</param>
public virtual void WriteTo(TextWriter writer, string value) public virtual void WriteTo(TextWriter writer, string value)
{ {
if (value != null) if (!string.IsNullOrEmpty(value))
{ {
writer.Write(WebUtility.HtmlEncode(value)); writer.Write(WebUtility.HtmlEncode(value));
} }
@ -187,7 +187,7 @@ namespace Microsoft.AspNet.Mvc.Razor
/// <param name="value">The <see cref="string"/> to write.</param> /// <param name="value">The <see cref="string"/> to write.</param>
public virtual void WriteLiteralTo(TextWriter writer, string value) public virtual void WriteLiteralTo(TextWriter writer, string value)
{ {
if (value != null) if (!string.IsNullOrEmpty(value))
{ {
writer.Write(value); writer.Write(value);
} }