Abhishek Singh
Abhishek Singh

Reputation: 1517

escapeHTML with Struts2 <s:textarea /> tag

I know, the below code will display the value in HTML format like <b>DATA< /b>, will be displayed as <b>DATA</b>.

<s:property value="workItem.Note" escapeHtml="false"/>

How can we achieve same with <s:textarea name="workItem.Note" value=""/>?. Text area displays value in normal string format like <b>DATA</b> not in HTML. Here I am assigning value from JavaScript that is coming from db in String format containing HTML.

Upvotes: 2

Views: 1219

Answers (1)

Roman C
Roman C

Reputation: 1

Use HTML textarea tag

<textarea name="workItem.Note">
   <s:property value="workItem.Note"/>
</textarea>

Upvotes: 2

Related Questions