4 Okay, face it. Programmers can get lazy, cut corners, or make mistakes. They
5 also can do quick prototypes, and then forget to rewrite them later. Well,
6 while I can't list mistakes in here, I can list prototype-like segments
7 of code that should be aggressively refactored. This does not list
8 optimization issues, that needs to be done after intense profiling.
10 docs/examples/demo.php - ad hoc HTML/PHP soup to the extreme
12 AttrDef - a lot of duplication, more generic classes need to be created;
13 a lot of strtolower() calls, no legit casing
14 Class - doesn't support Unicode characters (fringe); uses regular
16 Lang - code duplication; premature optimization
17 Length - easily mistaken for CSSLength
18 URI - multiple regular expressions; missing validation for parts (?)
19 CSS - parser doesn't accept advanced CSS (fringe)
20 Number - constructor interface inconsistent with Integer
21 ConfigSchema - redefinition is a mess
23 FixNesting - cannot bubble nodes out of structures, duplicated checks
24 for special-case parent node
25 MakeWellFormed - insufficient automatic closing definitions (check HTML
26 spec for optional end tags, also, closing based on type (block/inline)
28 RemoveForeignElements - should be run in parallel with MakeWellFormed
29 URIScheme - needs to have callable generic checks
30 mailto - doesn't validate emails, doesn't validate querystring
31 news - doesn't validate opaque path
32 nntp - doesn't constrain path