You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by je...@optonline.net on 2004/09/30 09:55:24 UTC
Slightly off topic
I am using Velocity and am trying to use a tool called FCKedit as well. With FCKedit I am collecting text field data that I store in the database. The data looks like this in the database:
<strong>replacement for the system. The system</strong></em></li><li><em>
When I try to take this data and display it in web pages using request velocity tool variables, it prints it out either as shown above or if I use <SPAN> as like above, but using the HTML equivalents as below:
<strong>replacement for the system. The system</strong>.....
What i need it to not have HTML tags of any sort int he end result, but the use of the HTML tags. I want <strong> to be applied to the text and not shown as a tag.
Is there a way to have this happen? Either in velocity or otherwise? I can't seem to get it working with javascript or the header encoding tag as I was hoping.
Thanks for any help.
John Ike
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: Slightly off topic
Posted by Nathan Green <ng...@inco5.com>.
John,
You will need a tool to convert the entity references. I don't think
the Velocity Tools project has one of these at the moment. I am not
aware of a simple program that will do this for you, but maybe someone
around here can help out. I did find this project:
http://andrei.gmxhome.de/anyedit/
It appears to have source code, so it shouldn't be too difficult to
come up with a simple class/function that only converts references. I
really think there must be a program out there somewhere, maybe even on
Jakarta, that would work, but I can't find anything at the moment.
Nathan
jeichels@optonline.net wrote:
> I am using Velocity and am trying to use a tool called FCKedit as well. With FCKedit I am collecting text field data that I store in the database. The data looks like this in the database:
>
> <strong>replacement for the system. The system</strong></em></li><li><em>
>
>
> When I try to take this data and display it in web pages using request velocity tool variables, it prints it out either as shown above or if I use <SPAN> as like above, but using the HTML equivalents as below:
>
> <strong>replacement for the system. The system</strong>.....
>
>
> What i need it to not have HTML tags of any sort int he end result, but the use of the HTML tags. I want <strong> to be applied to the text and not shown as a tag.
>
> Is there a way to have this happen? Either in velocity or otherwise? I can't seem to get it working with javascript or the header encoding tag as I was hoping.
>
> Thanks for any help.
>
> John Ike
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: Slightly off topic
Posted by Nathan Bubna <na...@esha.com>.
jeichels@optonline.net said:
...
> <strong>replacement for the system. The
system</strong></em></li><li><em>
>
> When I try to take this data and display it in web pages using
> request velocity tool variables, it prints it out either as shown
> above or if I use <SPAN> as like above, but using the HTML
> equivalents as below:
>
> <strong>replacement for the system. The system</strong>.....
>
> What i need it to not have HTML tags of any sort int he end result,
> but the use of the HTML tags. I want <strong> to be applied to the
> text and not shown as a tag.
...
http://jakarta.apache.org/commons/lang/api/org/apache/commons/lang/StringEscapeUtils.html
has both escaping and unescaping for xml entities. should do the trick for
you.
Nathan Bubna
nathan@esha.com
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
RE: Slightly off topic
Posted by Mike Curwen <g_...@globallyboundless.com>.
My question is: Why is it like that in the database? Have you encoded it
like that?
I've just installed fckedit (I've been meaning to try this out) and when I
use
request.getParameter("FCKeditor1");
The text returned is not encoded.
> -----Original Message-----
> From: jeichels@optonline.net [mailto:jeichels@optonline.net]
> Sent: Thursday, September 30, 2004 2:55 AM
> To: Velocity Users List
> Subject: Slightly off topic
>
>
> I am using Velocity and am trying to use a tool called
> FCKedit as well. With FCKedit I am collecting text field
> data that I store in the database. The data looks like this
> in the database:
>
> <strong>replacement for the system. The
> system</strong></em></li><li><em>
>
>
> When I try to take this data and display it in web pages
> using request velocity tool variables, it prints it out
> either as shown above or if I use <SPAN> as like above, but
> using the HTML equivalents as below:
>
> <strong>replacement for the system. The system</strong>.....
>
>
> What i need it to not have HTML tags of any sort int he end
> result, but the use of the HTML tags. I want <strong> to be
> applied to the text and not shown as a tag.
>
> Is there a way to have this happen? Either in velocity or
> otherwise? I can't seem to get it working with javascript
> or the header encoding tag as I was hoping.
>
> Thanks for any help.
>
> John Ike
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org