2006-11-19 03:10:14 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
2006-11-19 04:31:48 +00:00
|
|
|
<meta name="description" content="Discusses code quality issues and places that need to be refactored in HTML Purifier." />
|
2006-11-19 03:10:14 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="./style.css" />
|
2006-08-12 19:56:37 +00:00
|
|
|
|
2006-11-19 04:31:48 +00:00
|
|
|
<title>Code Quality Issues - HTML Purifier</title>
|
2006-08-12 19:56:37 +00:00
|
|
|
|
2006-11-19 03:10:14 +00:00
|
|
|
</head><body>
|
|
|
|
|
|
|
|
<h1>Code Quality Issues</h1>
|
|
|
|
|
2006-11-19 04:31:48 +00:00
|
|
|
<div id="filing">Filed under Development</div>
|
|
|
|
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
|
|
|
2006-11-19 03:10:14 +00:00
|
|
|
<p>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
|
2006-11-19 03:10:14 +00:00
|
|
|
optimization issues, that needs to be done after intense profiling.</p>
|
2006-08-12 19:56:37 +00:00
|
|
|
|
2006-11-19 03:10:14 +00:00
|
|
|
<pre>
|
2006-08-12 19:56:37 +00:00
|
|
|
AttrDef
|
2006-09-17 21:53:12 +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-09-17 21:53:12 +00:00
|
|
|
ConfigSchema - redefinition is a mess
|
2006-08-12 19:56:37 +00:00
|
|
|
Strategy
|
|
|
|
FixNesting - cannot bubble nodes out of structures
|
2006-08-25 03:01:16 +00:00
|
|
|
MakeWellFormed - insufficient automatic closing definitions (check HTML
|
2006-09-17 21:53:12 +00:00
|
|
|
spec for optional end tags, also, closing based on type (block/inline)
|
|
|
|
might be efficient).
|
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
|
2006-11-19 03:10:14 +00:00
|
|
|
</pre>
|
|
|
|
|
|
|
|
<div id="version">$Id$</div>
|
2006-08-12 19:56:37 +00:00
|
|
|
|
2006-11-19 03:10:14 +00:00
|
|
|
</body></html>
|