mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/11008] Change onunload_functions to not use eval()
PHPBB3-11008
This commit is contained in:
parent
ca43a8947a
commit
61f7f1b8ed
6 changed files with 12 additions and 8 deletions
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// <![CDATA[
|
// <![CDATA[
|
||||||
onload_functions.push('document.getElementById("<!-- IF S_ADMIN_AUTH -->{PASSWORD_CREDENTIAL}<!-- ELSE -->{USERNAME_CREDENTIAL}<!-- ENDIF -->").focus();');
|
onload_functions.push(function () {
|
||||||
|
document.getElementById("<!-- IF S_ADMIN_AUTH -->{PASSWORD_CREDENTIAL}<!-- ELSE -->{USERNAME_CREDENTIAL}<!-- ENDIF -->").focus();
|
||||||
|
});
|
||||||
// ]]>
|
// ]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
{
|
{
|
||||||
for (var i = 0; i < onload_functions.length; i++)
|
for (var i = 0; i < onload_functions.length; i++)
|
||||||
{
|
{
|
||||||
eval(onload_functions[i]);
|
onload_functions[i]();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
{
|
{
|
||||||
for (var i = 0; i < onunload_functions.length; i++)
|
for (var i = 0; i < onunload_functions.length; i++)
|
||||||
{
|
{
|
||||||
eval(onunload_functions[i]);
|
onunload_functions[i]();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// <![CDATA[
|
// <![CDATA[
|
||||||
onload_functions.push('apply_onkeypress_event()');
|
onload_functions.push(apply_onkeypress_event);
|
||||||
// ]]>
|
// ]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// <![CDATA[
|
// <![CDATA[
|
||||||
onload_functions.push('document.getElementById("keywords").focus();');
|
onload_functions.push(function () {
|
||||||
|
document.getElementById("keywords").focus();
|
||||||
|
});
|
||||||
// ]]>
|
// ]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{
|
{
|
||||||
for (var i = 0; i < onload_functions.length; i++)
|
for (var i = 0; i < onload_functions.length; i++)
|
||||||
{
|
{
|
||||||
eval(onload_functions[i]);
|
onload_functions[i]();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
{
|
{
|
||||||
for (var i = 0; i < onunload_functions.length; i++)
|
for (var i = 0; i < onunload_functions.length; i++)
|
||||||
{
|
{
|
||||||
eval(onunload_functions[i]);
|
onunload_functions[i]();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_REFRESH -->
|
<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_REFRESH -->
|
||||||
onload_functions.push('apply_onkeypress_event()');
|
onload_functions.push(apply_onkeypress_event);
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
// ]]>
|
// ]]>
|
||||||
|
|
Loading…
Add table
Reference in a new issue