2006-08-12 19:56:37 +00:00
|
|
|
|
2007-05-03 03:15:29 +00:00
|
|
|
Code Quality Issues
|
2006-08-12 19:56:37 +00:00
|
|
|
|
2007-05-03 03:15:29 +00:00
|
|
|
Okay, face it. Programmers can get lazy, cut corners, or make mistakes. They
|
2006-08-12 19:56:37 +00:00
|
|
|
also can do quick prototypes, and then forget to rewrite them later. Well,
|
|
|
|
while I can't list mistakes in here, I can list prototype-like segments
|
2006-11-12 19:26:49 +00:00
|
|
|
of code that should be aggressively refactored. This does not list
|
2007-05-03 03:15:29 +00:00
|
|
|
optimization issues, that needs to be done after intense profiling.
|
2006-08-12 19:56:37 +00:00
|
|
|
|
2006-11-23 22:34:41 +00:00
|
|
|
docs/examples/demo.php - ad hoc HTML/PHP soup to the extreme
|
|
|
|
|
2007-05-03 03:15:29 +00:00
|
|
|
AttrDef - a lot of duplication, more generic classes need to be created;
|
|
|
|
a lot of strtolower() calls, no legit casing
|
2007-08-02 22:44:42 +00:00
|
|
|
Class - doesn't support Unicode characters (fringe); uses regular expressions
|
2006-11-17 22:13:16 +00:00
|
|
|
Lang - code duplication; premature optimization
|
2006-09-17 21:53:12 +00:00
|
|
|
Length - easily mistaken for CSSLength
|
2006-11-17 22:13:16 +00:00
|
|
|
URI - multiple regular expressions; missing validation for parts (?)
|
2006-08-12 20:22:09 +00:00
|
|
|
CSS - parser doesn't accept advanced CSS (fringe)
|
2006-11-12 19:26:49 +00:00
|
|
|
Number - constructor interface inconsistent with Integer
|
2006-08-12 19:56:37 +00:00
|
|
|
Strategy
|
2006-11-23 21:36:17 +00:00
|
|
|
FixNesting - cannot bubble nodes out of structures, duplicated checks
|
|
|
|
for special-case parent node
|
2006-08-12 19:56:37 +00:00
|
|
|
RemoveForeignElements - should be run in parallel with MakeWellFormed
|
|
|
|
URIScheme - needs to have callable generic checks
|
2006-11-12 19:26:49 +00:00
|
|
|
mailto - doesn't validate emails, doesn't validate querystring
|
2006-08-12 19:56:37 +00:00
|
|
|
news - doesn't validate opaque path
|
|
|
|
nntp - doesn't constrain path
|
2016-06-17 23:39:18 +00:00
|
|
|
tel - doesn't validate phone numbers, only allows characters '+', '1-9', and 'x'
|
2008-12-06 09:24:59 +00:00
|
|
|
|
|
|
|
vim: et sw=4 sts=4
|