@@ 18-42 (lines=25) @@ | ||
15 | */ |
|
16 | class Body extends OpenElement implements SectioningRoot |
|
17 | { |
|
18 | protected function getAllowedAttributes() |
|
19 | { |
|
20 | $bodyAllowedAttributes = array( |
|
21 | '/^onafterprint$/i' => Attribute::JS, |
|
22 | '/^onbeforeprint$/i' => Attribute::JS, |
|
23 | '/^onbeforeunload$/i' => Attribute::JS, |
|
24 | '/^onhashchange$/i' => Attribute::JS, |
|
25 | '/^onlanguagechange$/i' => Attribute::JS, |
|
26 | '/^onmessage$/i' => Attribute::JS, |
|
27 | '/^onoffline$/i' => Attribute::JS, |
|
28 | '/^ononline$/i' => Attribute::JS, |
|
29 | '/^onpagehide$/i' => Attribute::JS, |
|
30 | '/^onpageshow$/i' => Attribute::JS, |
|
31 | '/^onpopstate$/i' => Attribute::JS, |
|
32 | '/^onrejectionhandled$/i' => Attribute::JS, |
|
33 | '/^onstorage$/i' => Attribute::JS, |
|
34 | '/^onunhandledrejection$/i' => Attribute::JS, |
|
35 | '/^onunload$/i' => Attribute::JS |
|
36 | ); |
|
37 | ||
38 | return array_merge( |
|
39 | $bodyAllowedAttributes, |
|
40 | parent::getAllowedAttributes() |
|
41 | ); |
|
42 | } |
|
43 | ||
44 | protected function removeInvalidSelf(LoggerInterface $logger) |
|
45 | { |
@@ 22-46 (lines=25) @@ | ||
19 | */ |
|
20 | class Textarea extends OpenElement implements FlowContent, InteractiveContent, PhrasingContent |
|
21 | { |
|
22 | protected function getAllowedAttributes() |
|
23 | { |
|
24 | $textareaAllowedAttributes = array( |
|
25 | '/^autocomplete$/i' => Attribute::CS_STRING, |
|
26 | '/^autofocus$/i' => Attribute::BOOL, |
|
27 | '/^cols$/i' => Attribute::INT, |
|
28 | '/^dirname$/i' => Attribute::CS_STRING, |
|
29 | '/^disabled$/i' => Attribute::BOOL, |
|
30 | '/^form$/i' => Attribute::CS_STRING, |
|
31 | '/^inputmode$/i' => Attribute::CS_STRING, |
|
32 | '/^maxlength$/i' => Attribute::CS_STRING, |
|
33 | '/^minlength$/i' => Attribute::CS_STRING, |
|
34 | '/^name$/i' => Attribute::CS_STRING, |
|
35 | '/^placeholder$/i' => Attribute::CS_STRING, |
|
36 | '/^readonly$/i' => Attribute::BOOL, |
|
37 | '/^required$/i' => Attribute::BOOL, |
|
38 | '/^rows$/i' => Attribute::INT, |
|
39 | '/^wrap$/i' => Attribute::CI_ENUM . '("","soft","hard"|"soft")' |
|
40 | ); |
|
41 | ||
42 | return array_merge( |
|
43 | $textareaAllowedAttributes, |
|
44 | parent::getAllowedAttributes() |
|
45 | ); |
|
46 | } |
|
47 | ||
48 | protected function removeInvalidChildren(LoggerInterface $logger) |
|
49 | { |