Skip to content
Snippets Groups Projects
Commit ee01cc51 authored by Gaus Surahman's avatar Gaus Surahman
Browse files

- Minor fixes.

parent 3c45d4e9
No related branches found
No related tags found
No related merge requests found
......@@ -241,6 +241,9 @@ class BlazyFilter {
// Checks if we have a valid file entity, not hard-coded image URL.
if ($src = $node->getAttribute('src')) {
// Iframe with data: scheme is a serious kidding, strip it earlier.
$src = drupal_strip_dangerous_protocols($src);
// If starts with 2 slashes, it is always external.
if (strpos($src, '//') === 0) {
// We need to query stored SRC, https is enforced.
......@@ -251,9 +254,6 @@ class BlazyFilter {
$settings['uri'] = $settings['image_url'] = $src;
}
elseif ($node->tagName == 'iframe') {
// Iframe with data: scheme is a serious kidding, strip it earlier.
$src = drupal_strip_dangerous_protocols($src);
$settings['input_url'] = $src;
$settings['uri'] = $settings['image_url'] = $this->getVideoThumbnail($src);
$settings['scheme'] = $this->getHost($src);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment