Hi, I'm using the latest version 2.4 in Websphere portal / Struts environment.
When I set the contents of the editor, the tags get translated incorrectly.
I've tried the forceSimpleAmpersand="true" but it doesn't solve the issue.
Value set on the custom tag:
---------------------------
<p>This is a <strong>test</strong>.</p>
In the code of the page:
------------------------
<input type="hidden" id="text" name="text" value="&lt;p&gt;This is a &lt;strong&gt;test&lt;/strong&gt;.&lt;/p&gt;">
Shown in the editor:
--------------------
<p>This is a <strong>test</strong>.</p>
Anybody any idea? I guess I'm missing something here...
When I set the contents of the editor, the tags get translated incorrectly.
I've tried the forceSimpleAmpersand="true" but it doesn't solve the issue.
Value set on the custom tag:
---------------------------
<p>This is a <strong>test</strong>.</p>
In the code of the page:
------------------------
<input type="hidden" id="text" name="text" value="&lt;p&gt;This is a &lt;strong&gt;test&lt;/strong&gt;.&lt;/p&gt;">
Shown in the editor:
--------------------
<p>This is a <strong>test</strong>.</p>
Anybody any idea? I guess I'm missing something here...
RE: &amp; translated into &amp;amp; in JSP
The trick is to give the custom tag unescaped HTML (using jakarta commons-lang-2.1).
Here is some sample code:
<%@page import="org.apache.commons.lang.StringEscapeUtils"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<bean:define id="frm" name="instructionDetailActionForm" type="mypackage.InstructionDetailActionForm" toScope="page"/>
<% String basePath = renderRequest.getContextPath() + renderResponse.encodeURL("/fckeditor/"); %>
<FCK:editor id="text" width="800" height="250" basePath="<%=basePath%>" toolbarSet="myToolBar"><%=StringEscapeUtils.unescapeHtml(frm.getText())%></FCK:editor>
Hope it works out for you as well.