Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

That's a design issue for the filter. The B is miss-nested, ending in a different block than it starts. Closing a non-block tag won't force a block tag to be closed. Opening a new block doesn't close non-block tags to prevent (huge?) thrash in existing 'sloppy' HTML that works in most browsers, regardless of what the standard says.

They aren't perfect heuristics but they seem to work pretty well and are less restrictive than an HTML validator. Of course, it is quite simple and so is not nearly as DWIM as most browsers.

You can take:

<B>Above these lines...<p></B>
which renders (with your current settings) as
Above these lines...

and gets filtered to
<b>Above these lines...<p>;/B&gt;</p></b>
and make it valid by changing it to
<B>Above these lines...</b><p><b></B> ^^^^ ^^^
Above these lines...

or you can just make the PM filter happy with
<B>Above these lines...<p></p></B> ^^^^
Above these lines...

(which shows the whole thing in bold in my browser, though the HTML validator complains about it)

If you wanted to see the PM filter close the B tag because of the P tag, you'd need to

<p><B>Above these lines...<p></B> ^^^

Above these lines...

which would get filtered into
<p><b>Above these lines...</b></p><p>;/B&gt;</p>

Above these lines...</B>

If you have a suggestion for a better heuristic, my ears are open. It'd be interesting to see how many existing nodes would be changed by having a new block close any non-block tags. I'd expect quite a few, but I don't have evidence of that.

Updated several times right after creation to add more detail in hopes of making things as clear as possible.

- tye        

In reply to Re^2: Proper nesting of HTML to be enforced (b p /b) by tye
in thread Proper nesting of HTML to be enforced by tye

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [stevieb]: ahem... s/no idea how to use it/didn't read enough as to what it's used for/
    [stevieb]: interestingly enough, someone else got my Devel::Examine:: Subs distribution for their PRC, and I applaud the change. This dist is extremely complicated and mostly obfu, but the person doing it understood PPI enough to change...
    [stevieb]: ...something I had overlooked in the extreme depths of the core functionality. After merging, then a couple of extra tweaks, I still have 100% test coverage. Yay for people who write tests!

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (5)
    As of 2017-01-24 01:18 GMT
    Find Nodes?
      Voting Booth?
      Do you watch meteor showers?

      Results (199 votes). Check out past polls.