tag container

Discussion in 'HTML' started by Armin, Feb 3, 2005.

  1. Armin

    Armin Guest

    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?
     
    Armin, Feb 3, 2005
    #1
    1. Advertising

  2. Armin

    SpaceGirl Guest

    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 #
     
    SpaceGirl, Feb 3, 2005
    #2
    1. Advertising

  3. Armin

    Els Guest

    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 vão. O resto é imperfeito.
    - Renato Russo -
     
    Els, Feb 3, 2005
    #3
  4. "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.


    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
     
    Jukka K. Korpela, Feb 3, 2005
    #4
  5. Armin

    Richard Guest

    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.
     
    Richard, Feb 3, 2005
    #5
  6. Armin

    Richard Guest

    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.
     
    Richard, Feb 3, 2005
    #6
  7. Armin

    rf Guest

    "Richard" <Anonymous@127.001> wrote in message
    news:...

    > 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.
     
    rf, Feb 3, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shruds
    Replies:
    1
    Views:
    841
    John C. Bollinger
    Jan 27, 2006
  2. Vivi Orunitia
    Replies:
    11
    Views:
    4,482
    Martijn Lievaart
    Feb 4, 2004
  3. Maitre Bart
    Replies:
    2
    Views:
    527
    Maitre Bart
    Feb 11, 2004
  4. Steven T. Hatton
    Replies:
    4
    Views:
    3,910
    Rob Williscroft
    Dec 5, 2004
  5. Replies:
    4
    Views:
    805
    Daniel T.
    Feb 16, 2006
Loading...

Share This Page