* Do not append <br /> tag in res.writeln(), only append a newline character sequence.
This commit is contained in:
parent
d76b720a8d
commit
a9553bb471
2 changed files with 2 additions and 7 deletions
|
@ -178,7 +178,7 @@ public class ResponseBean implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Write a string to the response buffer followed by an XHTML br tag.
|
||||
* Write string to response buffer and append a platform dependent newline sequence.
|
||||
*
|
||||
* @param str the string to write to the response buffer
|
||||
*/
|
||||
|
|
|
@ -285,7 +285,7 @@ public final class ResponseTrans implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Utility function that appends a <br> to whatever is written.
|
||||
* Write object to response buffer and append a platform dependent newline sequence.
|
||||
*/
|
||||
public synchronized void writeln(Object what) {
|
||||
write(what);
|
||||
|
@ -295,11 +295,6 @@ public final class ResponseTrans implements Serializable {
|
|||
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(newLine);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue