Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Proper nesting of HTML to be enforced

by theorbtwo (Prior)
on Feb 03, 2004 at 12:58 UTC ( #326184=note: print w/ replies, xml ) Need Help??


in reply to Proper nesting of HTML to be enforced

Additional problems thus far, found but not yet reported:

  • chatterbox faq dies. I'm currently looking into that, but nothing so far.
  • /me yadda </i>foo<i> bar. does not work. It seems to escape the first </i>, then insert a missing </i> at the end. I havn't looked into this yet, but suspect a gready/nongreedy problem.
  • 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. I havn't looked into this, and this will likely be unfixable, or at least, this requires a deep knowlage of the regex -- I'll leave it to tye.
  • <font color=""><span class=""> is used instead of <font color="" class="">. Noted here, but not fixed, because it requires changes to the .pm file, and "might as well" be batched with the other required changes.


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


Comment on Re: Proper nesting of HTML to be enforced
Select or Download Code
Re^2: Proper nesting of HTML to be enforced (bugs)
by tye (Cardinal) 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        

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://326184]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2014-09-20 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (151 votes), past polls