From 5cc5a1cd29b034939d7545140454c869844ddfea Mon Sep 17 00:00:00 2001 From: srowen Date: Mon, 16 Aug 2010 11:09:49 +0000 Subject: [PATCH] Preserve line breaks into XHTML git-svn-id: http://zxing.googlecode.com/svn/trunk@1534 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- zxingorg/web/decoderesult.jspx | 2 ++ 1 file changed, 2 insertions(+) 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/>"); } -- 2.20.1