From: srowen Date: Mon, 16 Aug 2010 11:09:49 +0000 (+0000) Subject: Preserve line breaks into XHTML X-Git-Url: http://git.rot13.org/?p=zxing.git;a=commitdiff_plain;h=5cc5a1cd29b034939d7545140454c869844ddfea Preserve line breaks into XHTML git-svn-id: http://zxing.googlecode.com/svn/trunk@1534 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- diff --git a/zxingorg/web/decoderesult.jspx b/zxingorg/web/decoderesult.jspx index 658cca1e..b7002f3e 100644 --- a/zxingorg/web/decoderesult.jspx +++ b/zxingorg/web/decoderesult.jspx @@ -67,6 +67,7 @@ text = "(Not applicable)"; } else { text = StringEscapeUtils.escapeXml(text); + text = text.replaceAll("\r?\n", "<br/>"); } byte[] rawBytes = result.getRawBytes(); @@ -82,6 +83,7 @@ displayResult = "(Not applicable)"; } else { displayResult = StringEscapeUtils.escapeXml(displayResult); + displayResult = displayResult.replaceAll("\r?\n", "<br/>"); }