Source:
<code>public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WTextArea textArea = (WTextArea) component; XmlStringBuilder xml = renderContext.getWriter(); int cols = textArea.getColumns(); int rows = textArea.getRows(); int minLength = textArea.getMinLength(); int maxLength = textArea.getMaxLength(); WComponent submitControl = textArea.getDefaultSubmitButton(); String submitControlId = submitControl == null ? null : submitControl.getId(); xml.appendTagOpen("ui:textarea"); xml.appendAttribute("id", component.getId()); xml.appendOptionalAttribute("class", component.getHtmlClass()); xml.appendOptionalAttribute("track", component.isTracking(), "true"); xml.appendOptionalAttribute("disabled", textArea.isDisabled(), "true"); xml.appendOptionalAttribute("hidden", textArea.isHidden(), "true"); xml.appendOptionalAttribute("required", textArea.isMandatory(), "true"); xml.appendOptionalAttribute("readOnly", textArea.isReadOnly(), "true"); xml.appendOptionalAttribute("minLength", minLength > 0, minLength); xml.appendOptionalAttribute("maxLength", maxLength > 0, maxLength); xml.appendOptionalAttribute("tabIndex", textArea.hasTabIndex(), textArea.getTabIndex()); xml.appendOptionalAttribute("toolTip", textArea.getToolTip()); xml.appendOptionalAttribute("accessibleText", textArea.getAccessibleText()); xml.appendOptionalAttribute("rows", rows > 0, rows); xml.appendOptionalAttribute("cols", cols > 0, cols); xml.appendOptionalAttribute("buttonId", submitControlId); xml.appendClose(); if (textArea.isRichTextArea()) { xml.append("<ui:rtf />"); } <START> String textString = textArea.getText(); <END> if (textString != null) { xml.append(textString, !(textArea.isReadOnly() && textArea.isRichTextArea())); } xml.appendEndTag("ui:textarea"); }</code><technical_language>I understand.... HTML sanitizing safe include in XML? escaping text for "ReadOnly" "Rich Text" field? is "not readonly"? Is dangerous escape allow "malicious" script through</technical_language>

Target:
public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WTextArea textArea = (WTextArea) component; XmlStringBuilder xml = renderContext.getWriter(); int cols = textArea.getColumns(); int rows = textArea.getRows(); int minLength = textArea.getMinLength(); int maxLength = textArea.getMaxLength(); WComponent submitControl = textArea.getDefaultSubmitButton(); String submitControlId = submitControl == null ? null : submitControl.getId(); xml.appendTagOpen("ui:textarea"); xml.appendAttribute("id", component.getId()); xml.appendOptionalAttribute("class", component.getHtmlClass()); xml.appendOptionalAttribute("track", component.isTracking(), "true"); xml.appendOptionalAttribute("disabled", textArea.isDisabled(), "true"); xml.appendOptionalAttribute("hidden", textArea.isHidden(), "true"); xml.appendOptionalAttribute("required", textArea.isMandatory(), "true"); xml.appendOptionalAttribute("readOnly", textArea.isReadOnly(), "true"); xml.appendOptionalAttribute("minLength", minLength > 0, minLength); xml.appendOptionalAttribute("maxLength", maxLength > 0, maxLength); xml.appendOptionalAttribute("tabIndex", textArea.hasTabIndex(), textArea.getTabIndex()); xml.appendOptionalAttribute("toolTip", textArea.getToolTip()); xml.appendOptionalAttribute("accessibleText", textArea.getAccessibleText()); xml.appendOptionalAttribute("rows", rows > 0, rows); xml.appendOptionalAttribute("cols", cols > 0, cols); xml.appendOptionalAttribute("buttonId", submitControlId); xml.appendClose(); if (textArea.isRichTextArea()) { xml.append("<ui:rtf />"); } String textString = textArea.getText(); if (textString != null) { if (!(textArea.isReadOnly() && textArea.isRichTextArea())) { xml.appendEscaped(textString); } else { xml.write(StringEscapeHTMLToXMLUtil.unescapeToXML(textString)); } } xml.appendEndTag("ui:textarea"); }