From d0660ac1b5e2da1497f6192813713ad20d8b1c91 Mon Sep 17 00:00:00 2001 From: hns Date: Fri, 16 Sep 2005 09:11:13 +0000 Subject: [PATCH] * Only append
in res.writeln() if contentType is one of "text/html" or "application/xhtml+xml". For any other content type, only an ordinary line break is appended to the line. --- src/helma/framework/ResponseTrans.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/helma/framework/ResponseTrans.java b/src/helma/framework/ResponseTrans.java index cdba659c..11b9367c 100644 --- a/src/helma/framework/ResponseTrans.java +++ b/src/helma/framework/ResponseTrans.java @@ -295,7 +295,11 @@ public final class ResponseTrans implements Serializable { buffer = new StringBuffer(INITIAL_BUFFER_SIZE); } - buffer.append("
"); + // only append
tag if we know this is an HTML/XHTML document. + // even then should we use
for HTML 4.0 and below. Well well well... + if ("text/html".equals(contentType) || "application/xhtml+xml".equals(contentType)) { + buffer.append("
"); + } buffer.append(newLine); }