Re: Basic HTML parsing for input?
Re: Basic HTML parsing for input?
- Subject: Re: Basic HTML parsing for input?
- From: Lachlan Deck <email@hidden>
- Date: Thu, 5 Jun 2008 13:44:36 +1000
On 05/06/2008, at 1:36 PM, Rams wrote:
On Jun 4, 2008, at 11:07 PM, Chuck Hill wrote:
On Jun 4, 2008, at 7:34 PM, Rams wrote:
Hi everyone,
Sorry if this is a really n00b question, but what do you use to
parse input for html tags? Is there anything built in? I'm using
WO 5.3.3 and Wonder.
Thanks!
What is it you want to do?
Chuck
Well, I have a WOText for user input that will be displayed once it
is saved... think: typical weblog.
Ideally, I'd like to allow a handful of html elements so that my
users can have line breaks, paragraphs, and not just a solid block
of text. At the same time, I'd also like to allow class attributes
so that certain elements can be styled for different uses... like a
shell code div, or a paragraph with a drop cap at the beginning.
Naturally, I want to strip out mismatched tags so they can't escape
their own little area on the page, strip out scripts, and pretty
much anything else that could be easily abused. Basically,
whitelist a few things and strip out everything else :-)
You might want to look into using a Textile engine. Quite simple to use.
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden