mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-10 07:38:41 +00:00
Document fact that inherit only works when its alone.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@315 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
6af60425b8
commit
f46b15cb82
@ -30,8 +30,8 @@ class HTMLPurifier_AttrDef_CSS extends HTMLPurifier_AttrDef
|
|||||||
list($property, $value) = explode(':', $declaration, 2);
|
list($property, $value) = explode(':', $declaration, 2);
|
||||||
if (!isset($definition->info[$property])) continue;
|
if (!isset($definition->info[$property])) continue;
|
||||||
// inefficient call, since the validator will do this again
|
// inefficient call, since the validator will do this again
|
||||||
// inherit works for everything
|
|
||||||
if (strtolower(trim($value)) !== 'inherit') {
|
if (strtolower(trim($value)) !== 'inherit') {
|
||||||
|
// inherit works for everything (but only on the base property)
|
||||||
$result = $definition->info[$property]->validate(
|
$result = $definition->info[$property]->validate(
|
||||||
$value, $config, $context );
|
$value, $config, $context );
|
||||||
} else {
|
} else {
|
||||||
|
@ -8,6 +8,10 @@ require_once 'HTMLPurifier/AttrDef.php';
|
|||||||
* Certain CSS properties such as border-width and margin allow multiple
|
* Certain CSS properties such as border-width and margin allow multiple
|
||||||
* lengths to be specified. This class can take a vanilla border-width
|
* lengths to be specified. This class can take a vanilla border-width
|
||||||
* definition and multiply it, usually into a max of four.
|
* definition and multiply it, usually into a max of four.
|
||||||
|
*
|
||||||
|
* @note Even though the CSS specification isn't clear about it, inherit
|
||||||
|
* can only be used alone: it will never manifest as part of a multi
|
||||||
|
* shorthand declaration. Thus, this class does not allow inherit.
|
||||||
*/
|
*/
|
||||||
class HTMLPurifier_AttrDef_Multiple extends HTMLPurifier_AttrDef
|
class HTMLPurifier_AttrDef_Multiple extends HTMLPurifier_AttrDef
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user