PHP 클래스 HTMLPurifier_Strategy_FixNesting, yii
HTML elements dictate which elements are allowed to be their children,
for example, you can't have a p tag in a span tag. Other elements have
much more rigorous definitions: tables, for instance, require a specific
order for their elements. There are also constraints not expressible by
document type definitions, such as the chameleon nature of ins/del
tags and global child exclusions.
The first major objective of this strategy is to iterate through all the
nodes (not tokens) of the list of tokens and determine whether or not
their children conform to the element's definition. If they do not, the
child definition may optionally supply an amended list of elements that
is valid or require that the entire node be deleted (and the previous
node rescanned).
The second objective is to ensure that explicitly excluded elements of
an element do not appear in its children. Code that accomplishes this
task is pervasive through the strategy, though the two are distinct tasks
and could, theoretically, be seperated (although it's not recommended).
파일 보기
프로젝트 열기: yiisoft/yii
공개 메소드들
메소드 |
설명 |
|
execute ( HTMLPurifier_Token[] $tokens, HTMLPurifier_Config $config, HTMLPurifier_Context $context ) : array | HTMLPurifier_Token[] |
|
|
메소드 상세
public execute ( HTMLPurifier_Token[] $tokens, HTMLPurifier_Config $config, HTMLPurifier_Context $context ) : array | HTMLPurifier_Token[] |
$tokens |
HTMLPurifier_Token[] |
|
$config |
HTMLPurifier_Config |
|
$context |
HTMLPurifier_Context |
|
리턴 |
array | HTMLPurifier_Token[] |
|