Critical fix in TemplateEngine

main
Inga 🏳‍🌈 15 years ago
parent fc18882943
commit 62fa8b8b48
  1. 6
      IISMainHandler/TemplateEngine.cs

@ -33,13 +33,13 @@ namespace FLocal.IISHandler {
} }
public static string Compile(string templateName, XDocument data) { public static string Compile(string templateName, XDocument data) {
XDocument result = new XDocument(); StringBuilder builder = new StringBuilder();
using(XmlWriter writer = result.CreateWriter()) { using(XmlWriter writer = XmlWriter.Create(builder, new XmlWriterSettings { Indent = true, NewLineHandling = NewLineHandling.None})) {
using(XmlReader reader = data.CreateReader()) { using(XmlReader reader = data.CreateReader()) {
TemplateCacher.instance.getCompiledTransform(templateName).Transform(reader, writer); TemplateCacher.instance.getCompiledTransform(templateName).Transform(reader, writer);
} }
} }
return result.ToString(); return builder.ToString();
} }
} }

Loading…
Cancel
Save