From 61f7f1b8edf5cf0efb1b33495e2069a151d6baa9 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Fri, 20 Jul 2012 23:59:04 +0200 Subject: [PATCH] [ticket/11008] Change onunload_functions to not use eval() PHPBB3-11008 --- phpBB/styles/prosilver/template/login_body.html | 4 +++- phpBB/styles/prosilver/template/overall_header.html | 4 ++-- phpBB/styles/prosilver/template/posting_editor.html | 2 +- phpBB/styles/prosilver/template/search_body.html | 4 +++- phpBB/styles/prosilver/template/simple_header.html | 4 ++-- phpBB/styles/prosilver/template/ucp_register.html | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/phpBB/styles/prosilver/template/login_body.html b/phpBB/styles/prosilver/template/login_body.html index d8b9b01779..90d8191676 100644 --- a/phpBB/styles/prosilver/template/login_body.html +++ b/phpBB/styles/prosilver/template/login_body.html @@ -2,7 +2,9 @@ diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 349309ab4e..43ae83767d 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -56,7 +56,7 @@ { 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++) { - eval(onunload_functions[i]); + onunload_functions[i](); } }; diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html index d1c86e7e13..99e518d486 100644 --- a/phpBB/styles/prosilver/template/posting_editor.html +++ b/phpBB/styles/prosilver/template/posting_editor.html @@ -1,6 +1,6 @@ diff --git a/phpBB/styles/prosilver/template/search_body.html b/phpBB/styles/prosilver/template/search_body.html index a8baafa5f1..0d8797b2ff 100644 --- a/phpBB/styles/prosilver/template/search_body.html +++ b/phpBB/styles/prosilver/template/search_body.html @@ -2,7 +2,9 @@ diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index 5440d66520..6026dfd329 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -26,7 +26,7 @@ { 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++) { - eval(onunload_functions[i]); + onunload_functions[i](); } } diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html index 994356efe6..e14ca6493d 100644 --- a/phpBB/styles/prosilver/template/ucp_register.html +++ b/phpBB/styles/prosilver/template/ucp_register.html @@ -12,7 +12,7 @@ } - onload_functions.push('apply_onkeypress_event()'); + onload_functions.push(apply_onkeypress_event); // ]]>