diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-06-13 09:18:39 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-06-13 09:18:39 +0200 |
commit | e963714ad6346e7c89ad15c2dfaff1636ebb1795 (patch) | |
tree | 6ea94ce95ad7f114a07e2fbdc9f3d375cbb9d2e4 /Zotlabs/Module/Wiki.php | |
parent | ef95c68b4f33102145837a0f87981f4e8a8c8876 (diff) | |
parent | 6d4188f05e2a8e92508b1d38e4b7ef5156ba6c42 (diff) | |
download | volse-hubzilla-e963714ad6346e7c89ad15c2dfaff1636ebb1795.tar.gz volse-hubzilla-e963714ad6346e7c89ad15c2dfaff1636ebb1795.tar.bz2 volse-hubzilla-e963714ad6346e7c89ad15c2dfaff1636ebb1795.zip |
Merge branch 'dev' into sabre32
Diffstat (limited to 'Zotlabs/Module/Wiki.php')
-rw-r--r-- | Zotlabs/Module/Wiki.php | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php index fbf751ddf..1e6446904 100644 --- a/Zotlabs/Module/Wiki.php +++ b/Zotlabs/Module/Wiki.php @@ -167,7 +167,7 @@ class Wiki extends \Zotlabs\Web\Controller { if((argc() > 2) && (argv(2) === 'preview')) { $content = $_POST['content']; require_once('library/markdown.php'); - $html = Markdown($content); + $html = purify_html(Markdown($content)); json_return_and_die(array('html' => $html, 'success' => true)); } @@ -182,19 +182,7 @@ class Wiki extends \Zotlabs\Web\Controller { // more detail permissions framework if (local_channel() !== intval($channel['channel_id'])) { goaway('/'.argv(0).'/'.$nick.'/'); - } else { - /* - $channel = get_channel_by_nick($nick); - // Figure out who the page owner is. - $perms = get_all_perms(intval($channel['channel_id']), $observer_hash); - // TODO: Create a new permission setting for wiki analogous to webpages. Until - // then, use webpage permissions - if (!$perms['write_pages']) { - notice(t('Permission denied.') . EOL); - goaway('/'.argv(0).'/'.argv(1).'/'); - } - */ - } + } $wiki = array(); // Generate new wiki info from input name $wiki['rawName'] = $_POST['wikiName']; @@ -306,7 +294,7 @@ class Wiki extends \Zotlabs\Web\Controller { $resource_id = $_POST['resource_id']; $pageUrlName = $_POST['name']; $pageHtmlName = escape_tags($_POST['name']); - $content = escape_tags($_POST['content']); //Get new content + $content = $_POST['content']; //Get new content $commitMsg = $_POST['commitMsg']; if ($commitMsg === '') { $commitMsg = 'Updated ' . $pageHtmlName; |