Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set generous HTTP feature policy #114

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Merge branch 'master' into add-http-feature-policy
otacke authored Sep 1, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit d07c68cedd44e2ed98307a5817ebccd14901fc82
11 changes: 9 additions & 2 deletions public/class-h5p-plugin.php
Original file line number Diff line number Diff line change
@@ -1065,8 +1065,15 @@ public function add_assets($content, $no_cache = FALSE) {
else {
$h5p_http_feature_policy = 'allow="' . self::$h5p_http_feature_policy . '"';
}

return '<div class="h5p-iframe-wrapper"><iframe id="h5p-iframe-' . $content['id'] . '" class="h5p-iframe" data-content-id="' . $content['id'] . '" style="height:1px" src="about:blank" frameBorder="0" scrolling="no"' . $h5p_http_feature_policy . '></iframe></div>';

$title = isset($content['metadata']['a11yTitle'])
? $content['metadata']['a11yTitle']
: (isset($content['metadata']['title'])
? $content['metadata']['title']
: ''
);

return '<div class="h5p-iframe-wrapper"><iframe id="h5p-iframe-' . $content['id'] . '" class="h5p-iframe" data-content-id="' . $content['id'] . '" style="height:1px" src="about:blank" frameBorder="0" scrolling="no" title="' . $title . ' ' . $h5p_http_feature_policy . '"></iframe></div>';
}
}

You are viewing a condensed version of this merge commit. You can view the full changes here.