diff options
author | hubzilla <git@macgirvin.com> | 2016-08-05 18:03:31 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-05 18:03:31 +1000 |
commit | 709206accde6136f96f1484510edc4b61b3d52a7 (patch) | |
tree | a6d88a480ab41b6b63cf76d2a7367182034fc36e /Zotlabs | |
parent | 92862f93f31beb009247144bae5d8b0a58b562b5 (diff) | |
parent | faf1045ef5bc030212270d53c7efd8431ed0007c (diff) | |
download | volse-hubzilla-709206accde6136f96f1484510edc4b61b3d52a7.tar.gz volse-hubzilla-709206accde6136f96f1484510edc4b61b3d52a7.tar.bz2 volse-hubzilla-709206accde6136f96f1484510edc4b61b3d52a7.zip |
Merge pull request #476 from anaqreon/wiki
Wiki bbcode parsing
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Wiki.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php index 55a52ea6d..24a0b6e1c 100644 --- a/Zotlabs/Module/Wiki.php +++ b/Zotlabs/Module/Wiki.php @@ -142,8 +142,8 @@ class Wiki extends \Zotlabs\Web\Controller { } $content = ($p['content'] !== '' ? htmlspecialchars_decode($p['content'],ENT_COMPAT) : '"# New page\n"'); // Render the Markdown-formatted page content in HTML - require_once('library/markdown.php'); - $html = wiki_generate_toc(purify_html(Markdown(json_decode($content)))); + require_once('library/markdown.php'); + $html = wiki_generate_toc(purify_html(Markdown(wiki_bbcode(json_decode($content))))); $renderedContent = wiki_convert_links($html,argv(0).'/'.argv(1).'/'.$wikiUrlName); $hide_editor = false; $showPageControls = $wiki_editor; @@ -221,6 +221,7 @@ class Wiki extends \Zotlabs\Web\Controller { $content = $_POST['content']; $resource_id = $_POST['resource_id']; require_once('library/markdown.php'); + $content = wiki_bbcode($content); $html = wiki_generate_toc(purify_html(Markdown($content))); $w = wiki_get_wiki($resource_id); $wikiURL = argv(0).'/'.argv(1).'/'.$w['urlName']; |