tag container

A

Armin

Is there a TAG that you can put around some html where tags are only closed
if they where opened within this TAG.

for example:

<table>
<tr>
<td><TAG></table></TAG></td>
</tr>
</table>

the first occurrence of </table> should be ignored because this tag was not
opened within <TAG>

I need this for a forum where user should be able to post html but can not
mess up the whole page by closing any tags they did not open.

I guess there is no such TAG but wouldn't this be great?

Does anyone know a workaround?
 
S

SpaceGirl

Armin said:
Is there a TAG that you can put around some html where tags are only closed
if they where opened within this TAG.

for example:

<table>
<tr>
<td><TAG></table></TAG></td>
</tr>
</table>

the first occurrence of </table> should be ignored because this tag was not
opened within <TAG>

I need this for a forum where user should be able to post html but can not
mess up the whole page by closing any tags they did not open.

I guess there is no such TAG but wouldn't this be great?

Does anyone know a workaround?

Server side scripting. You cannot do this kind of programmatic stuff in
HTML. HTML is a markup language.

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
E

Els

SpaceGirl said:
Server side scripting. You cannot do this kind of
programmatic stuff in HTML. HTML is a markup language.

True, but an Iframe would help? Anything in an <iframe> would
not have any effect on what's outside of the iframe.

Still would need server side stuff to make the posted html be
on a seperate page, which is loaded into the iframe though.
But as this is about a forum, I guess there already is some
server side scripting.
 
J

Jukka K. Korpela

Armin said:
Is there a TAG that you can put around some html where tags are only
closed if they where opened within this TAG.

No. Please explain what your real, original problem is, instead of trying
to work with an assumed (wrong) solution to an unspecified problem.
Start from that, even in the Subject line.
I need this for a forum where user should be able to post html but can
not mess up the whole page by closing any tags they did not open.

OK, now the real problem can be guessed. You need much better forum
software. If you study programming, you might actually wish to do the
coding, but otherwise just find better software. If you wish to allow HTML
postings, you need to make the software handle it well, probably using
filtering that allows just a limited set of "safe" markup.
I guess there is no such TAG but wouldn't this be great?

No.
 
R

Richard

Is there a TAG that you can put around some html where tags are only
closed
if they where opened within this TAG.
for example:



the first occurrence of </table> should be ignored because this tag was
not
opened within <TAG>
I need this for a forum where user should be able to post html but can
not
mess up the whole page by closing any tags they did not open.
I guess there is no such TAG but wouldn't this be great?
Does anyone know a workaround?


It's generally done with the PHP scripting.
PHPBB does exactly what you want to do.

The inclusion of a second table within a table is the wrong approach.
You should use <tbody> instead.
 
R

Richard

SpaceGirl wrote:
True, but an Iframe would help? Anything in an <iframe> would
not have any effect on what's outside of the iframe.
Still would need server side stuff to make the posted html be
on a seperate page, which is loaded into the iframe though.
But as this is about a forum, I guess there already is some
server side scripting.

PHPBB already does what the OP wants to.
If the user forgets to close the open tags, the script does it
automatically.
It also has a feature where the user can click an icon and close the tags.
This is all done within the text input block.
for instance, if I post the link, http://www/shoveitupyourarse.now
The link would be simply color coded to show the text as a link.
PHPBB also includes a simple method to create a link using a single word.
 
R

rf

PHPBB already does what the OP wants to.
If the user forgets to close the open tags, the script does it
automatically.

This is, as usual, the complete opposite of what the OP wants.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,228
Latest member
MikeMichal

Latest Threads

Top