summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2012-02-07 00:46:20 +1100
committerMichael Save <savetheinternet@tinyboard.org>2012-02-07 00:46:20 +1100
commit3868004169decf757dfa3f29c8624e5c6e8e5715 (patch)
tree9560313717c164db62d65c5b5ed05b0fd29f8547
parent01e15e2a7f55c72fc71d2861917aa31ee7ef67e8 (diff)
double escape with web editor (on permissions error)
-rw-r--r--mod.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/mod.php b/mod.php
index 3d189323..065d3d3c 100644
--- a/mod.php
+++ b/mod.php
@@ -1855,6 +1855,8 @@
header('Location: ?/config' . $b['uri'], true, $config['redirect_http']);
exit;
} else {
+ $config_append = htmlentities($config_append);
+
if($config['minify_html'])
$config_append = str_replace("\n", '&#010;', $config_append);
$page = Array();
@@ -1863,7 +1865,7 @@
$page['body'] = '
<p>Tinyboard could not write to <strong>inc/instance-config.php</strong> with the ammended configuration, probably due to a permissions error.</p>
<p>You may proceed with these changes manually by copying and pasting the following code to the bottom of <strong>inc/instance-config.php</strong>:</p>
- <textarea style="width:700px;height:370px;margin:auto;display:block;background:white;color:black" readonly>' . htmlentities($config_append) . '</textarea>
+ <textarea style="width:700px;height:370px;margin:auto;display:block;background:white;color:black" readonly>' . $config_append . '</textarea>
';
echo Element('page.html', $page);
exit;