You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jeff Kyser <kt...@comcast.net> on 2003/04/20 01:40:26 UTC
Re: html in a string being encoded - how can I turn it back into html?
in your <bean:write /> , just set filter="false" to keep the markup.
> <h1><bean:write name="theArticle" property="articleTitle"
> filter="false"/></h1>
-jeff
On Saturday, April 19, 2003, at 06:41 PM, Rachel wrote:
> Hi
>
> I'm a newbie and not sure if this is Struts or just general java
> behavior related however,
>
> I have some articles in a database table and they contain html
> formatting from the previous system. I want to be able to display
> these articles as they are formatted in the database. When I output
> the string using the struts-html tags however, it is encoded and so in
> the source <p> ends up as <p> etc. so the html displays on the
> page. I can think of many situations where this behavior would be
> great .. just not this one :)
>
> This is what I have:
>
> <html:xhtml/>
>
> <logic:iterate id="theArticle" name="displayForm"
> property="selectedArticles">
> <h1><bean:write name="theArticle" property="articleTitle"/></h1>
> <p>
> <bean:write name="theArticle" property="articleContent" /></p>
> </logic:iterate>
>
> How can I get the html in the string "articleContent" to write out as
> html?
>
> Thanks
>
> Rachel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: html in a string being encoded - how can I turn it back into html?
Posted by Jeff Kyser <kt...@comcast.net>.
(and everywhere else you want the markup as well :)
On Saturday, April 19, 2003, at 06:40 PM, Jeff Kyser wrote:
> in your <bean:write /> , just set filter="false" to keep the markup.
>
>> <h1><bean:write name="theArticle" property="articleTitle"
>> filter="false"/></h1>
>
>
> -jeff
>
>
> On Saturday, April 19, 2003, at 06:41 PM, Rachel wrote:
>
>> Hi
>>
>> I'm a newbie and not sure if this is Struts or just general java
>> behavior related however,
>>
>> I have some articles in a database table and they contain html
>> formatting from the previous system. I want to be able to display
>> these articles as they are formatted in the database. When I output
>> the string using the struts-html tags however, it is encoded and so
>> in the source <p> ends up as <p> etc. so the html displays on
>> the page. I can think of many situations where this behavior would be
>> great .. just not this one :)
>>
>> This is what I have:
>>
>> <html:xhtml/>
>>
>> <logic:iterate id="theArticle" name="displayForm"
>> property="selectedArticles">
>> <h1><bean:write name="theArticle" property="articleTitle"/></h1>
>> <p>
>> <bean:write name="theArticle" property="articleContent" /></p>
>> </logic:iterate>
>>
>> How can I get the html in the string "articleContent" to write out as
>> html?
>>
>> Thanks
>>
>> Rachel
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org