Skip to content

Commit

Permalink
Fix fatal error in AMP_Object_Sanitizer now that Tag::OBJECT is missi…
Browse files Browse the repository at this point in the history
…ng in amp-toolbox-php
  • Loading branch information
westonruter committed Jun 24, 2021
1 parent e9231fa commit 5968fe9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions includes/sanitizers/class-amp-object-sanitizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use AmpProject\Dom\Element;
use AmpProject\Extension;
use AmpProject\Layout;
use AmpProject\Tag;

/**
* Class AMP_Object_Sanitizer
Expand All @@ -35,7 +34,7 @@ class AMP_Object_Sanitizer extends AMP_Base_Sanitizer {
*/
public function get_selector_conversion_mapping() {
return [
Tag::OBJECT => [
'object' => [
Extension::GOOGLE_DOCUMENT_EMBED,
],
];
Expand All @@ -45,7 +44,7 @@ public function get_selector_conversion_mapping() {
* Sanitize `object` elements from the HTML contained in this instance's Dom\Document.
*/
public function sanitize() {
$elements = $this->dom->getElementsByTagName( Tag::OBJECT );
$elements = $this->dom->getElementsByTagName( 'object' );

if ( 0 === $elements->length ) {
return;
Expand Down

0 comments on commit 5968fe9

Please sign in to comment.