From 91faf25eb9bd51463c4c553653989e47d59a0455 Mon Sep 17 00:00:00 2001 From: Florent Hernandez Date: Sat, 5 Dec 2020 10:47:17 +0100 Subject: [PATCH] PLANET-5773: CSL iframe not loading on posts Ref: https://jira.greenpeace.org/browse/PLANET-5773 > it seems as though CSL iframes work fine on page but not on posts. ControlShiftLabs iframe script relies on attributes `id` and `data-petition-url` to insert its form. We filter a post content before display in a certain way, that is not applied to pages, and strips those attrributes.. Allowlisting those attributes allows CSL script to work. --- src/MasterSite.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MasterSite.php b/src/MasterSite.php index cc793e0aab..8410f90347 100644 --- a/src/MasterSite.php +++ b/src/MasterSite.php @@ -595,7 +595,9 @@ public function set_custom_allowed_attributes_filter( $allowedposttags ) { ]; $allowedposttags['script'] = [ - 'src' => true, + 'src' => true, + 'id' => true, + 'data-*' => true, ]; // Allow source tag for WordPress audio shortcode to function.