@@ 18-31 (lines=14) @@ | ||
15 | */ |
|
16 | class Embed extends ClosedElement implements FlowContent, PhrasingContent, EmbeddedContent, InteractiveContent |
|
17 | { |
|
18 | protected function getAllowedAttributes() |
|
19 | { |
|
20 | $embedAllowedAttributes = array( |
|
21 | '/^src$/i' => Element::ATTR_URI, |
|
22 | '/^type$/i' => Element::ATTR_CS_STRING, |
|
23 | '/^name$/i' => Element::ATTR_CS_STRING, |
|
24 | '/^[a-z_-]$/i' => Element::ATTR_CS_STRING, |
|
25 | ); |
|
26 | ||
27 | return array_merge( |
|
28 | $embedAllowedAttributes, |
|
29 | parent::getAllowedAttributes() |
|
30 | ); |
|
31 | } |
|
32 | ||
33 | public function isInteractiveContent() |
|
34 | { |
@@ 13-27 (lines=15) @@ | ||
10 | ||
11 | class Meta extends ClosedElement implements MetadataContent |
|
12 | { |
|
13 | protected function getAllowedAttributes() |
|
14 | { |
|
15 | $metaAllowedAttributes = array( |
|
16 | '/^name$/i' => Element::ATTR_CS_STRING, |
|
17 | '/^http-equiv$/i' => Element::ATTR_CI_ENUM . '("content-language","content-type","default-style","refresh","set-cookie","x-ua-compatible","content-security-policy")', |
|
18 | '/^content$/i' => Element::ATTR_CS_STRING, |
|
19 | '/^charset$/i' => Element::ATTR_CI_STRING, |
|
20 | '/^property$/i' => Element::ATTR_CS_STRING // Facebook OG attribute name. |
|
21 | ); |
|
22 | ||
23 | return array_merge( |
|
24 | $metaAllowedAttributes, |
|
25 | parent::getAllowedAttributes() |
|
26 | ); |
|
27 | } |
|
28 | ||
29 | protected function doClean(LoggerInterface $logger) |
|
30 | { |
@@ 17-31 (lines=15) @@ | ||
14 | */ |
|
15 | class Source extends ClosedElement |
|
16 | { |
|
17 | protected function getAllowedAttributes() |
|
18 | { |
|
19 | $sourceAllowedAttributes = array( |
|
20 | '/^src$/i' => Element::ATTR_URI, |
|
21 | '/^type$/i' => Element::ATTR_CS_STRING, |
|
22 | '/^srcset$/i' => Element::ATTR_CS_STRING, |
|
23 | '/^sizes$/i' => Element::ATTR_CS_STRING, |
|
24 | '/^media$/i' => Element::ATTR_CS_STRING |
|
25 | ); |
|
26 | ||
27 | return array_merge( |
|
28 | $sourceAllowedAttributes, |
|
29 | parent::getAllowedAttributes() |
|
30 | ); |
|
31 | } |
|
32 | ||
33 | protected function doClean(LoggerInterface $logger) |
|
34 | { |
@@ 11-24 (lines=14) @@ | ||
8 | ||
9 | class Style extends OpenElement implements MetadataContent |
|
10 | { |
|
11 | protected function getAllowedAttributes() |
|
12 | { |
|
13 | $styleAllowedAttributes = array( |
|
14 | '/^media$/i' => Element::ATTR_CS_STRING, |
|
15 | '/^nonce$/i' => Element::ATTR_CS_STRING, |
|
16 | '/^type$/i' => Element::ATTR_CI_STRING, |
|
17 | '/^scoped$/i' => Element::ATTR_CI_STRING |
|
18 | ); |
|
19 | ||
20 | return array_merge( |
|
21 | $styleAllowedAttributes, |
|
22 | parent::getAllowedAttributes() |
|
23 | ); |
|
24 | } |
|
25 | } |
|
26 |
@@ 16-30 (lines=15) @@ | ||
13 | */ |
|
14 | class Track extends ClosedElement |
|
15 | { |
|
16 | protected function getAllowedAttributes() |
|
17 | { |
|
18 | $trackAllowedAttributes = array( |
|
19 | '/^kind$/i' => Element::ATTR_CS_STRING, |
|
20 | '/^src$/i' => Element::ATTR_URI, |
|
21 | '/^srclang$/i' => Element::ATTR_CS_STRING, |
|
22 | '/^label$/i' => Element::ATTR_CS_STRING, |
|
23 | '/^default$/i' => Element::ATTR_BOOL |
|
24 | ); |
|
25 | ||
26 | return array_merge( |
|
27 | $trackAllowedAttributes, |
|
28 | parent::getAllowedAttributes() |
|
29 | ); |
|
30 | } |
|
31 | ||
32 | protected function doClean(LoggerInterface $logger) |
|
33 | { |