Broken HTML in Compendium

Post/Author/DateTimePost
#1

slyfel

Dec 17, 2010 17:00:32
So, this is perhaps a bit of a nit-pick. But a lot of the Compendium items aren't valid HTML or are broken in some other way:

1. Unclosed tags
Sometimes a tag is left unclosed. For an example, see Tharashk Hunter, which has a dangling {p} tag. This seems to happen in two cases: 1). at the end of some power declarations that have a recharge specification of 6 2). At the end of some monsters right before the "Published in " section.

The pages render correctly because most browsers detect that you probably meant to close that {p} before opening another one (see problem #3 below)

2. Dangling definitions
Some pieces of a power or item aren't wrapped in {p} tags and so aren't styled at all, making it look like they're not actually part of the card. See: Bloodclaw Weapon.


3. Powers inside of paragraphs
{p} tags can't contain any other block-level elements inside them, such as other {p} tags. This is a problem in the class definitions, which try to wrap embedded powers inside of {p} tags. Since the power defs are made up of divs, h1s, and ps, the browser goes all frown town on you.


Well, not really. If a browser encounters a block-level element inside a {p}, it closes the {p} first. This is why issue #1 is not causing your cards to look weird. Although it is mangling your DOM structure a bit.


Anyway...uh....the script generating the card HTML has some bugs it seems. FYI.