Skip to content

Commit

Permalink
PLANET-5773: CSL iframe not loading on posts
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lithrel committed Dec 5, 2020
1 parent 700bf73 commit 91faf25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/MasterSite.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 91faf25

Please sign in to comment.