aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-06-12 07:17:23 -0400
committerAndrew Manning <tamanning@zoho.com>2016-06-12 07:17:23 -0400
commite109abbef7fed77898da7adb9d43e686dc96c29a (patch)
tree27461e9de07590454f63ff7d9398e3f6361b692c /include
parent0cada39c8afe1858a8e710ada8dfc66f4cb8f1bf (diff)
downloadvolse-hubzilla-e109abbef7fed77898da7adb9d43e686dc96c29a.tar.gz
volse-hubzilla-e109abbef7fed77898da7adb9d43e686dc96c29a.tar.bz2
volse-hubzilla-e109abbef7fed77898da7adb9d43e686dc96c29a.zip
Apply purify_html to page content before preview and save to prevent JavaScript code injection.
Diffstat (limited to 'include')
-rw-r--r--include/wiki.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/wiki.php b/include/wiki.php
index f0785d549..4aa3fc1b4 100644
--- a/include/wiki.php
+++ b/include/wiki.php
@@ -279,7 +279,7 @@ function wiki_page_history($arr) {
function wiki_save_page($arr) {
$pageUrlName = ((array_key_exists('pageUrlName',$arr)) ? $arr['pageUrlName'] : '');
- $content = ((array_key_exists('content',$arr)) ? $arr['content'] : '');
+ $content = ((array_key_exists('content',$arr)) ? purify_html($arr['content']) : '');
$resource_id = ((array_key_exists('resource_id',$arr)) ? $arr['resource_id'] : '');
$w = wiki_get_wiki($resource_id);
if (!$w['path']) {