Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > tag container

Reply
Thread Tools

tag container

 
 
Armin
Guest
Posts: n/a
 
      02-03-2005
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?


 
Reply With Quote
 
 
 
 
SpaceGirl
Guest
Posts: n/a
 
      02-03-2005
Armin wrote:
> 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 #
 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      02-03-2005
SpaceGirl wrote:

> Armin wrote:
>> 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.


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.

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      02-03-2005
"Armin" <(E-Mail Removed)> wrote:

> 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.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      02-03-2005
On Thu, 3 Feb 2005 14:55:58 +0100 Armin wrote:

> 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>


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


> </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?



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.


 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      02-03-2005
On 3 Feb 2005 14:02:32 GMT Els wrote:

> SpaceGirl wrote:


>> Armin wrote:
>>> 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.


> 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.


 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      02-03-2005
"Richard" <Anonymous@127.001> wrote in message
news:(E-Mail Removed)...

> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy elements from one STL container to another STL container Marko.Cain.23@gmail.com C++ 4 02-16-2006 05:03 PM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
std::transform container => std::abs(container) Steven T. Hatton C++ 4 12-05-2004 07:10 AM
STL: container's values setup by another container Maitre Bart C++ 2 02-11-2004 12:11 AM
std::container::iterator vs std::container::pointer Vivi Orunitia C++ 11 02-04-2004 08:09 AM



Advertisments