reStructuredText in RevTalk ?

Andre Garzia andre at andregarzia.com
Tue Nov 10 18:49:55 EST 2009


Hi There Alex,

if you're building a HTML interface for the users, then, you can use one of
the rich html editors out there such as the YUI! one or FCKEditor... There
are many and they will give you formatting without the need of html writting
by your users.

If that is not the case and you're allowing the users to drop files in some
place and they are picked up by the CMS, the quickest way to ensure they are
not adding stuff that they shouldn't, simply replace all < with > and >
with <, this will break all tags, then work by replacing the tags you
allow back such as replacing >b< with <b>. This will leave unallowed
tags on the page as text but your users will soon know what they can  or
cannot use, if you want to ensure they are using valid XHTML or HTML, you
can pass the file thru "tidy" and it will fix the broken tags or give you a
warning back.

Cheers
andre

On Tue, Nov 10, 2009 at 9:36 PM, Alex Tweedly <alex at tweedly.net> wrote:

>
> I'm using a simple file-based CMS in on-rev (along the lines of Andre's
> CMS/blog system).
>
> I'm looking for a simple way to allow users to include simple html within
> the files which will be included as part of the web pages. I need to protect
> from any accidental damage to the rest of the page (e.g. if they add <div>s
> or mis-matched or incorrect <table>, etc.) , and some users will not be
> familiar with html. Really all I need is <br>, <p>, simple <li>, and
> URL/mail addresses.
>
> I guess I could build a html parser that disallowed any 'unsafe' html - but
> that doesn't sounds trivial (and it assumes I can think of all the cases
> where html could cause a problem).
>
> Or I could come up with some format of my own to do it.
>
> Or I could build a (small subset of?) reStructuredText to make it easier to
> use, and then translate this to html for the output.
>
> Has anyone built this already, in a form they could share ?
> Or anything equivalent (and hopefully simpler :-)
>
> (btw - http://docutils.sourceforge.net/rst.html )
>
> Thanks
> -- Alex.
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
http://www.andregarzia.com All We Do Is Code.



More information about the use-livecode mailing list