From 67ebeea531664b3ca559a5b2ba5b649d563b140a Mon Sep 17 00:00:00 2001 From: thelovekesh Date: Wed, 25 Oct 2023 12:30:13 +0530 Subject: [PATCH] Update img sanitizer to avoid adding `fetchpriority` attribute to amp-img --- includes/sanitizers/class-amp-img-sanitizer.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/sanitizers/class-amp-img-sanitizer.php b/includes/sanitizers/class-amp-img-sanitizer.php index f4bcf30d482..914153e2e48 100644 --- a/includes/sanitizers/class-amp-img-sanitizer.php +++ b/includes/sanitizers/class-amp-img-sanitizer.php @@ -298,6 +298,10 @@ private function filter_attributes( $attributes ) { } break; + // Avoid adding `fetchpriority` to amp-img element. + case Attribute::FETCHPRIORITY: + break; + default: $out[ $name ] = $value; break;