struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian McSweeney" <brian.mcswee...@aurium.net>
Subject RE: two little questions
Date Mon, 14 Jul 2003 15:17:06 GMT
Thanks Wes,
That's what I'm looking for!
Cheers,
Brian

-----Original Message-----
From: Wes Rood [mailto:wes9999@myfastmail.com] 
Sent: 14 July 2003 15:32
To: Struts Users Mailing List
Subject: Re: two little questions

Q1:
Look at OSCore from Opensymphony:
http://www.opensymphony.com/oscore/

Specifically, the plainTextToHtml method in the TextUtils class: 
http://www.opensymphony.com/oscore/api/com/opensymphony/util/TextUtils.h
tml#plainTextToHtml(java.lang.String)

This does exactly what Andrew mentions, plus it takes care of line
breaks.


Andrew Hill wrote:

>Other alternative is similar - convert the < and > to &lt; and &gt;
etc...
>so it outputs as though it was text.
>
>-----Original Message-----
>From: Brian McSweeney [mailto:brian.mcsweeney@aurium.net]
>Sent: Monday, 14 July 2003 18:38
>To: 'Struts Users Mailing List'
>Subject: RE: two little questions
>
>
>Hi Simon,
>That was my original idea too. Just wanted to see if other people were
>doing the same.
>
>Cheers,
>Brian
>
>-----Original Message-----
>From: Simon Kelly [mailto:kelly@ipe.fzk.de]
>Sent: 14 July 2003 10:58
>To: Struts Users Mailing List
>Subject: Re: two little questions
>
>For Q1.
>
>You could pass the data that they enter through a paser, that delimits
>out
>the <...> tags by placing '!--' after any '<' and '--' before and '>',
>this
>will stop this text being viewed as html. Or jusr remove the tags or
>allow
>cetain tags and remove any that aren't in the allowable ones!
>
>Cheers
>
>Simon
>
>----- Original Message -----
>From: "Brian McSweeney" <brian.mcsweeney@aurium.net>
>To: <struts-user@jakarta.apache.org>
>Sent: Monday, July 14, 2003 11:49 AM
>Subject: two little questions
>
>
>  
>
>>Question1:
>>
>>If my application allows users to enter text which will then later be
>>displayed on
>>web pages, do I have to ensure that the text they write isn't html.
>>    
>>
>For
>  
>
>>example,
>>lets say a message board application. If a user enters in loads of
>>    
>>
>text
>  
>
>>which is
>>html, will this not mess up the page when it is displayed? If so, how
>>    
>>
>do
>  
>
>>people
>>check for this.
>>
>>Question2:
>>
>>If I want my app to be able to allow users to enter text in any
>>    
>>
>language
>  
>
>>- eg,
>>multi-lingual message boards, do I have to configure my database to be
>>able to
>>handle multiple language types, or should it just work.
>>
>>Thanks for any replies,
>>Brian
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>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
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message