| @@ 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 | ||
| @@ 14-28 (lines=15) @@ | ||
| 11 | ||
| 12 | class Meta extends ClosedElement implements MetadataContent |
|
| 13 | { |
|
| 14 | protected function getAllowedAttributes() |
|
| 15 | { |
|
| 16 | $metaAllowedAttributes = array( |
|
| 17 | '/^name$/i' => Element::ATTR_CS_STRING, |
|
| 18 | '/^http-equiv$/i' => Element::ATTR_CI_ENUM . '("content-language","content-type","default-style","refresh","set-cookie","x-ua-compatible","content-security-policy")', |
|
| 19 | '/^content$/i' => Element::ATTR_CS_STRING, |
|
| 20 | '/^charset$/i' => Element::ATTR_CI_STRING, |
|
| 21 | '/^property$/i' => Element::ATTR_CS_STRING // Facebook OG attribute name. |
|
| 22 | ); |
|
| 23 | ||
| 24 | return array_merge( |
|
| 25 | $metaAllowedAttributes, |
|
| 26 | parent::getAllowedAttributes() |
|
| 27 | ); |
|
| 28 | } |
|
| 29 | ||
| 30 | protected function doClean(LoggerInterface $logger) |
|
| 31 | { |
|
| @@ 18-30 (lines=13) @@ | ||
| 15 | */ |
|
| 16 | class Ol extends OpenElement |
|
| 17 | { |
|
| 18 | protected function getAllowedAttributes() |
|
| 19 | { |
|
| 20 | $olAllowedAttributes = array( |
|
| 21 | '/^reversed$/i' => Element::ATTR_BOOL, |
|
| 22 | '/^start$/i' => Element::ATTR_INT, |
|
| 23 | '/^type$/i' => Element::ATTR_CS_STRING, |
|
| 24 | ); |
|
| 25 | ||
| 26 | return array_merge( |
|
| 27 | $olAllowedAttributes, |
|
| 28 | parent::getAllowedAttributes() |
|
| 29 | ); |
|
| 30 | } |
|
| 31 | ||
| 32 | protected function doClean(LoggerInterface $logger) |
|
| 33 | { |
|