Author: sichen
Date: Wed May 9 09:19:19 2007
New Revision: 536576
URL:
http://svn.apache.org/viewvc?view=rev&rev=536576Log:
Convert newlines to proper html br with the form widget. From Scott Gray. OFBIZ-973
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?view=diff&rev=536576&r1=536575&r2=536576==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Wed May 9 09:19:19 2007
@@ -163,7 +163,10 @@
if (str.length() > 0) {
buffer.append(str);
}
- buffer.append(displayField.getDescription(context));
+ String description = displayField.getDescription(context);
+ //Replace new lines with <br>
+ description = description.replaceAll("\n", "<br>");
+ buffer.append(description);
if (str.length() > 0) {
buffer.append("</span>");
}