[theforum] Allowable tags in content in new site

Martin Burns martin at uckwa.org
Fri Feb 18 18:14:22 CST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all

One of the nice things about the new site is that we can do some 
autofiltering on content submissions. Specifically, we have 2 options 
for users:

1) Auto-add all the para tags, and severely limit the acceptable HTML 
to really innocuous stuff
2) limit the tags to those in our code guide.

Based on the code guide:
http://www.evolt.org/guide_code
and with a bit of thinking of the kind of thing that users do, here's 
the list of acceptable tags I've implemented:
<p> <a> <img> <em> <strong> <cite> <blockquote> <q> <code> <pre> <abbr> 
<acronym> <thead> <tbody> <tfoot> <tr> <th> <td> <table> <ul> <ol> <li> 
<dl> <dt> <dd> <h2> <h3> <h4> <h5> <h6>

Note that I've removed:
<b>
<i>
<hr>
<br>
and added <q>

Everything else is stored in the db, but stripped out before delivering 
to the page. (We can also strip out any style attributes, but that's 
too useful imo).

There is a third option: full PHP rendering, but we've disabled that 
for everyone but admins.

  Contentians - does that sound reasonable in the light of current 
practise? Theforumates - sound OK to you too?

btw, see how that article renders in the new site:
http://test.evolt.org/node/5945
which is probably useful as it demonstrates pretty much everything 
you'd expect to find in an article.

It *will* need a bit of a rewrite anyway, not least because <pre> 
doesn't get rendered to a textarea in the new site, it's just a styled 
<pre> with overflow.

Cheers
Martin
- --
Now playing on iTunes: "Moonage Daydream" by David Bowie from 'The Rise 
And Fall Of Ziggy Stardust And The Spiders From Mars' - a hit from way 
back in 1972

 > Spammers: Send me email -> yumyum at easyweb.co.uk to train my filter
 > http://www.nuclearelephant.com/projects/dspam/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCFoTfon5lm40dmVIRAhrBAKDdceFIq7Lftrnr9B9eUD9u5BvFFQCeN0Nd
Zm8Y+kc9lTrIgGRG0xbuxdk=
=ZrCw
-----END PGP SIGNATURE-----



More information about the theforum mailing list