* Only append <br /> 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.
This commit is contained in:
parent
cd3fdb4fab
commit
d0660ac1b5
1 changed files with 5 additions and 1 deletions
|
@ -295,7 +295,11 @@ public final class ResponseTrans implements Serializable {
|
||||||
buffer = new StringBuffer(INITIAL_BUFFER_SIZE);
|
buffer = new StringBuffer(INITIAL_BUFFER_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// only append <br> tag if we know this is an HTML/XHTML document.
|
||||||
|
// even then should we use <br> for HTML 4.0 and below. Well well well...
|
||||||
|
if ("text/html".equals(contentType) || "application/xhtml+xml".equals(contentType)) {
|
||||||
buffer.append("<br />");
|
buffer.append("<br />");
|
||||||
|
}
|
||||||
buffer.append(newLine);
|
buffer.append(newLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue