src/Tokens/Elements/Head.php 1 location
|
@@ 64-73 (lines=10) @@
|
61 |
|
|
62 |
|
continue; |
63 |
|
} |
64 |
|
} elseif ($child->getName() == 'base') { |
65 |
|
++$baseCount; |
66 |
|
if ($baseCount > 1) { |
67 |
|
$logger->debug('Removing ' . $child . '. Maximum one "base" element allowed.'); |
68 |
|
|
69 |
|
$this->removeChild($child); |
70 |
|
|
71 |
|
continue; |
72 |
|
} |
73 |
|
} |
74 |
|
} |
75 |
|
} |
76 |
|
|
src/Tokens/Elements/Html.php 1 location
|
@@ 103-113 (lines=11) @@
|
100 |
|
|
101 |
|
continue; |
102 |
|
} |
103 |
|
} elseif ($child instanceof Body) { |
104 |
|
++$bodyCount; |
105 |
|
|
106 |
|
// Remove extraneous BODY elements. |
107 |
|
if ($bodyCount > 1) { |
108 |
|
$logger->debug('Removing ' . $child . '. Only one BODY element allowed.'); |
109 |
|
$this->removeChild($child); |
110 |
|
|
111 |
|
continue; |
112 |
|
} |
113 |
|
} else { |
114 |
|
$logger->debug('Removing ' . $child . '. Only "head" or "body" elements are allowed as "html" element children.'); |
115 |
|
$this->removeChild($child); |
116 |
|
} |