1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en"><head>
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" />
6 <meta name=
"description" content=
"Discusses code quality issues and places that need to be refactored in HTML Purifier." />
7 <link rel=
"stylesheet" type=
"text/css" href=
"./style.css" />
9 <title>Code Quality Issues - HTML Purifier
</title>
13 <h1>Code Quality Issues
</h1>
15 <div id=
"filing">Filed under Development
</div>
16 <div id=
"index">Return to the
<a href=
"index.html">index
</a>.
</div>
18 <p>Okay, face it. Programmers can get lazy, cut corners, or make mistakes. They
19 also can do quick prototypes, and then forget to rewrite them later. Well,
20 while I can't list mistakes in here, I can list prototype-like segments
21 of code that should be aggressively refactored. This does not list
22 optimization issues, that needs to be done after intense profiling.
</p>
26 Class - doesn't support Unicode characters (fringe); uses regular
28 Lang - code duplication; premature optimization
29 Length - easily mistaken for CSSLength
30 URI - multiple regular expressions; missing validation for parts (?)
31 CSS - parser doesn't accept advanced CSS (fringe)
32 Number - constructor interface inconsistent with Integer
33 ConfigSchema - redefinition is a mess
35 FixNesting - cannot bubble nodes out of structures, duplicated checks
36 for special-case parent node
37 MakeWellFormed - insufficient automatic closing definitions (check HTML
38 spec for optional end tags, also, closing based on type (block/inline)
40 RemoveForeignElements - should be run in parallel with MakeWellFormed
41 URIScheme - needs to have callable generic checks
42 mailto - doesn't validate emails, doesn't validate querystring
43 news - doesn't validate opaque path
44 nntp - doesn't constrain path
47 <div id=
"version">$Id$
</div>