aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-06-26 15:41:25 -0400
committerAndrew Manning <tamanning@zoho.com>2016-06-26 15:41:25 -0400
commit81da9f99e4ee111623a1ba302a6ab18e369756e9 (patch)
treee6def754cf008e3763da80c7d79198557390e850 /Zotlabs/Module
parent216f034b6dd0d26282035218126d312080a9adc3 (diff)
downloadvolse-hubzilla-81da9f99e4ee111623a1ba302a6ab18e369756e9.tar.gz
volse-hubzilla-81da9f99e4ee111623a1ba302a6ab18e369756e9.tar.bz2
volse-hubzilla-81da9f99e4ee111623a1ba302a6ab18e369756e9.zip
Fixed bug with rendering table of contents upon page load
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Wiki.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php
index 9b89ed967..a5039fa23 100644
--- a/Zotlabs/Module/Wiki.php
+++ b/Zotlabs/Module/Wiki.php
@@ -126,8 +126,9 @@ class Wiki extends \Zotlabs\Web\Controller {
$content = ($p['content'] !== '' ? $p['content'] : '"# New page\n"');
// Render the Markdown-formatted page content in HTML
require_once('library/markdown.php');
- $content = wiki_generate_toc($content);
- $renderedContent = wiki_convert_links(Markdown(json_decode($content)),argv(0).'/'.argv(1).'/'.$wikiUrlName);
+ $toc_content = wiki_generate_toc(json_decode($content));
+ $html = purify_html(Markdown($toc_content));
+ $renderedContent = wiki_convert_links($html,argv(0).'/'.argv(1).'/'.$wikiUrlName);
$hide_editor = false;
$showPageControls = $wiki_editor;
$showNewWikiButton = $wiki_owner;