Preserve line breaks into XHTML

git-svn-id: https://zxing.googlecode.com/svn/trunk@1534 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2010-08-16 11:09:49 +00:00
parent aee6be71f3
commit c194eb915c

View file

@ -67,6 +67,7 @@
text = "(Not applicable)"; text = "(Not applicable)";
} else { } else {
text = StringEscapeUtils.escapeXml(text); text = StringEscapeUtils.escapeXml(text);
text = text.replaceAll("\r?\n", "<br/>");
} }
byte[] rawBytes = result.getRawBytes(); byte[] rawBytes = result.getRawBytes();
@ -82,6 +83,7 @@
displayResult = "(Not applicable)"; displayResult = "(Not applicable)";
} else { } else {
displayResult = StringEscapeUtils.escapeXml(displayResult); displayResult = StringEscapeUtils.escapeXml(displayResult);
displayResult = displayResult.replaceAll("\r?\n", "<br/>");
} }
</jsp:scriptlet> </jsp:scriptlet>
<table> <table>