-Minor fixes

This commit is contained in:
James Newton-King
2016-05-29 01:26:00 +12:00
parent 52fbb613d7
commit 1ae2912ee7
6 changed files with 23 additions and 47 deletions
@@ -503,7 +503,7 @@ If attributes are not mentioned, default values are used in each case.
{
for (int i = 0; i < interations; i++)
{
using (StringWriter w = StringUtils.CreateStringWriter(StringUtils.GetLength(text) ?? 16))
using (StringWriter w = StringUtils.CreateStringWriter(text.Length))
{
char[] buffer = null;
JavaScriptUtils.WriteEscapedJavaScriptString(w, text, '"', true, JavaScriptUtils.DoubleQuoteCharEscapeFlags, StringEscapeHandling.Default, null, ref buffer);