Issue #3034591 by sasiddiqui: stripping out value from script src
This commit is contained in:
parent
5c7af971ba
commit
a29d9984fa
24
header_and_footer_scripts.module
Executable file → Normal file
24
header_and_footer_scripts.module
Executable file → Normal file
@ -68,8 +68,8 @@ function header_and_footer_scripts_page_top(array &$page_top) {
|
||||
}
|
||||
|
||||
$attr_key_value = explode('=', $attr);
|
||||
if (isset($attr_key_value[0]) && isset($attr_key_value[1])) {
|
||||
$style_attr[$attr_key_value[0]] = $attr_key_value[1];
|
||||
if (2 <= count($attr_key_value)) {
|
||||
$style_attr[$attr_key_value[0]] = preg_replace('/' . $attr_key_value[0] . '=/', '', $attr, 1);
|
||||
}
|
||||
else {
|
||||
$style_attr[$attr_key_value[0]] = $attr_key_value[0];
|
||||
@ -126,8 +126,8 @@ function header_and_footer_scripts_page_top(array &$page_top) {
|
||||
}
|
||||
|
||||
$attr_key_value = explode('=', $attr);
|
||||
if (isset($attr_key_value[0]) && isset($attr_key_value[1])) {
|
||||
$script_attr[$attr_key_value[0]] = $attr_key_value[1];
|
||||
if (2 <= count($attr_key_value)) {
|
||||
$script_attr[$attr_key_value[0]] = preg_replace('/' . $attr_key_value[0] . '=/', '', $attr, 1);
|
||||
}
|
||||
else {
|
||||
$script_attr[$attr_key_value[0]] = $attr_key_value[0];
|
||||
@ -194,8 +194,8 @@ function header_and_footer_scripts_page_bottom(array &$page_bottom) {
|
||||
}
|
||||
|
||||
$attr_key_value = explode('=', $attr);
|
||||
if (isset($attr_key_value[0]) && isset($attr_key_value[1])) {
|
||||
$style_attr[$attr_key_value[0]] = $attr_key_value[1];
|
||||
if (2 <= count($attr_key_value)) {
|
||||
$style_attr[$attr_key_value[0]] = preg_replace('/' . $attr_key_value[0] . '=/', '', $attr, 1);
|
||||
}
|
||||
else {
|
||||
$style_attr[$attr_key_value[0]] = $attr_key_value[0];
|
||||
@ -252,8 +252,8 @@ function header_and_footer_scripts_page_bottom(array &$page_bottom) {
|
||||
}
|
||||
|
||||
$attr_key_value = explode('=', $attr);
|
||||
if (isset($attr_key_value[0]) && isset($attr_key_value[1])) {
|
||||
$script_attr[$attr_key_value[0]] = $attr_key_value[1];
|
||||
if (2 <= count($attr_key_value)) {
|
||||
$script_attr[$attr_key_value[0]] = preg_replace('/' . $attr_key_value[0] . '=/', '', $attr, 1);
|
||||
}
|
||||
else {
|
||||
$script_attr[$attr_key_value[0]] = $attr_key_value[0];
|
||||
@ -320,8 +320,8 @@ function header_and_footer_scripts_page_attachments_alter(array &$attachments) {
|
||||
}
|
||||
|
||||
$attr_key_value = explode('=', $attr);
|
||||
if (isset($attr_key_value[0]) && isset($attr_key_value[1])) {
|
||||
$style_attr[$attr_key_value[0]] = $attr_key_value[1];
|
||||
if (2 <= count($attr_key_value)) {
|
||||
$style_attr[$attr_key_value[0]] = preg_replace('/' . $attr_key_value[0] . '=/', '', $attr, 1);
|
||||
}
|
||||
else {
|
||||
$style_attr[$attr_key_value[0]] = $attr_key_value[0];
|
||||
@ -381,8 +381,8 @@ function header_and_footer_scripts_page_attachments_alter(array &$attachments) {
|
||||
}
|
||||
|
||||
$attr_key_value = explode('=', $attr);
|
||||
if (isset($attr_key_value[0]) && isset($attr_key_value[1])) {
|
||||
$script_attr[$attr_key_value[0]] = $attr_key_value[1];
|
||||
if (2 <= count($attr_key_value)) {
|
||||
$script_attr[$attr_key_value[0]] = preg_replace('/' . $attr_key_value[0] . '=/', '', $attr, 1);
|
||||
}
|
||||
else {
|
||||
$script_attr[$attr_key_value[0]] = $attr_key_value[0];
|
||||
|
Loading…
x
Reference in New Issue
Block a user