Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

side effects "Enforce proper nesting of HTML"

by LanX (Saint)
on Jun 03, 2017 at 17:09 UTC ( [id://1192062]=monkdiscuss: print w/replies, xml ) Need Help??

I just noticed that my display of this node How to analyse structured data to get a hash was totally messed up (no line breaks), but becomes kind of "readable" after I logged off (the OP avoided code tags)

Like this but there are strikes thru the break tags

I have a file with rows of data which are typically like</br> Attr num +="101" name="Created" desc="Time file was created." type="t" ord="3" value="2 +017-06- 03T11:27:23+01:00"</br> I want to analyse this so that I can get a has +h with data like </br> Attr num ->101</br> Name ->Created</br> Desc ->Time f +ile was ...

Turned out that my  Display Settings had "Enforce proper nesting of HTML" enabled, which didn't go well with the OP's use of </br> tags.

Though after reading the help page, I don't understand why

  • Enforce proper nesting of HTML - If set, PerlMonks adds explicit closing tags in cases where an element was implicitly closed due to the ending of an outer element.

Merely an information, not sure if this demands action.

FWIW: disabled the option now.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re: side effects "Enforce proper nesting of HTML"
by tye (Sage) on Jun 05, 2017 at 04:15 UTC

    Because many browsers have decided to treat </br> as if it were something useful like <br />. The current version of our HTML parsing code does not go quite so far in assigning meaning to nonsense.

    - tye        

      Shouldn't illegal markup always be rejected?

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!

        Be conservative in what you do, be liberal in what you accept from others.
        —Postel's law

        I would support it. I would support removing deprecated HTML as well.

        No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
        Lady Aleena

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://1192062]
Approved by 1nickt
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-18 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found