mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-23 08:51:53 +00:00
41c9226f3d
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
50 lines
1.9 KiB
HTML
50 lines
1.9 KiB
HTML
<?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" />
|
|
<meta name="description" content="Proposal to allow for color constraints in HTML Purifier." />
|
|
<link rel="stylesheet" type="text/css" href="./style.css" />
|
|
|
|
<title>Proposal: Colors - HTML Purifier</title>
|
|
|
|
</head><body>
|
|
|
|
<h1 class="subtitled">Colors</h1>
|
|
<div class="subtitle">Hammering some sense into those color-blind newbies</div>
|
|
|
|
<div id="filing">Filed under Proposals</div>
|
|
<div id="index">Return to the <a href="index.html">index</a>.</div>
|
|
<div id="home"><a href="http://htmlpurifier.org/">HTML Purifier</a> End-User Documentation</div>
|
|
|
|
<p>Your website probably has a color-scheme.
|
|
<span style="color:#090; background:#FFF;">Green on white</span>,
|
|
<span style="color:#A0F; background:#FF0;">purple on yellow</span>,
|
|
whatever. When you give users the ability to style their content, you may
|
|
want them to keep in line with your styling. If you're website is all
|
|
about light colors, you don't want a user to come in and vandalize your
|
|
page with a deep maroon.</p>
|
|
|
|
<p>This is an extremely silly feature proposal, but I'm writing it down anyway.</p>
|
|
|
|
<p>What if the user could constrain the colors specified in inline styles? You
|
|
are only allowed to use these shades of dark green for text and these shades
|
|
of light yellow for the background. At the very least, you could ensure
|
|
that we did not have pale yellow on white text.</p>
|
|
|
|
<h2>Implementation issues</h2>
|
|
|
|
<ol>
|
|
<li>Requires the color attribute definition to know, currently, what the text
|
|
and background colors are. This becomes difficult when classes are thrown
|
|
into the mix.</li>
|
|
<li>The user still has to define the permissible colors, how does one do
|
|
something like that?</li>
|
|
</ol>
|
|
|
|
</body>
|
|
</html>
|
|
|
|
<!-- vim: et sw=4 sts=4
|
|
-->
|