http://www.perlmonks.org?node_id=326184


in reply to Proper nesting of HTML to be enforced

Additional problems thus far, found but not yet reported:


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Replies are listed 'Best First'.
Re^2: Proper nesting of HTML to be enforced (bugs)
by tye (Sage) on Feb 03, 2004 at 19:59 UTC
    chatterbox faq dies

    Interesting. It appears that ($q->param('htmlnest'))[-1] is sometimes complaining of "Can't use an undefined value as an ARRAY reference", which is strange since that code shouldn't be trying to do what it is complaining about not being able to do (but I don't see any other candidates for the complaint near line 205). I'll look at it some more.

    Update: Fixed. The line number reported for the error was way off (probably because it was inside of a multi-line s{}{}gsex block).

    /me [broken]

    That is now fixed thanks to theorbtwo. Note that ;htmlerror=1 will show greyed </i>s on the end of any /me chatter lines unless the author included their own </i>. This is by design as otherwise you'd see a visible </i> if someone chats "/me reads </i>The Times", whether htmlerror is enabled or not.

    A missing tag in a context where font or span is not allowed, combined with htmlerror=1 mode, will insert the font and span tags, then escape them.

    Uh, no, it won't. If you've seen this happen, then point it out to me. I could happen if content gets filtered twice, but I think that was only happening for chatter and the outer filter already allowed FONT and SPAN and I think you've removed that outer filter now (thanks), so I don't think this is a problem anywhere.

    [use] <font color="" class="">

    Works for me. I'll change that the next time I touch the code.

    Update: Fixed.

    Thanks.

    - tye