summaryrefslogtreecommitdiffstats
path: root/usr/local/www/pkg_edit.php
diff options
context:
space:
mode:
authorColin Fleming <cj_fleming@sky.com>2014-06-05 19:41:50 +0100
committerColin Fleming <cj_fleming@sky.com>2014-06-05 19:41:50 +0100
commit2690afba236a6fbb30a287f1005ca374e4adada2 (patch)
tree7073a3f4e468077ea4cdaf005a14b64beede649a /usr/local/www/pkg_edit.php
parented10564bfe664e0c4723217cded9e134b9d82a08 (diff)
downloadpfsense-2690afba236a6fbb30a287f1005ca374e4adada2.zip
pfsense-2690afba236a6fbb30a287f1005ca374e4adada2.tar.gz
Update "pkg_edit.,php"
"custom_php_after_head_command", if the PHP code also contains JavaScript ("squid_auth.xml" for example) then this will cause HTML errors, as you are not supposed to have anything between the closing HEAD tag and the opening BODY tag. Add the CLOSEHEAD PHP variable, move the include HEAD.INC into the PHP IF statement and manually close the HEAD tab, else just include HEAD.INC
Diffstat (limited to 'usr/local/www/pkg_edit.php')
-rw-r--r--usr/local/www/pkg_edit.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php
index 8db3eae..d9544ed 100644
--- a/usr/local/www/pkg_edit.php
+++ b/usr/local/www/pkg_edit.php
@@ -258,10 +258,15 @@ else
$title = gettext("Package Editor");
$pgtitle = $title;
-include("head.inc");
-if ($pkg['custom_php_after_head_command'])
+if ($pkg['custom_php_after_head_command']) {
+ $closehead = false;
+ include("head.inc");
eval($pkg['custom_php_after_head_command']);
+ echo "</head>\n";
+}
+else
+ include("head.inc");
?>
OpenPOWER on IntegriCloud