diff options
author | Mario <mario@mariovavti.com> | 2018-10-08 21:20:17 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-10-08 21:20:17 +0200 |
commit | 37b94bf5fa71835fe50af6f862e124e24b5db4b4 (patch) | |
tree | 012afad21875e324bd43051c843fef371c3ddd9d /Zotlabs/Widget | |
parent | a00a849952eec8f7d7d480f8663446dc1fb7238c (diff) | |
parent | 709665846e66f093109730691b31d9e094d02088 (diff) | |
download | volse-hubzilla-37b94bf5fa71835fe50af6f862e124e24b5db4b4.tar.gz volse-hubzilla-37b94bf5fa71835fe50af6f862e124e24b5db4b4.tar.bz2 volse-hubzilla-37b94bf5fa71835fe50af6f862e124e24b5db4b4.zip |
Merge branch 'fix-wiki-escaping' into 'dev'
Fix wiki escaping (Regression tests needed)
See merge request hubzilla/core!1321
Diffstat (limited to 'Zotlabs/Widget')
-rw-r--r-- | Zotlabs/Widget/Wiki_pages.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Zotlabs/Widget/Wiki_pages.php b/Zotlabs/Widget/Wiki_pages.php index ecd2c9100..dee0a2229 100644 --- a/Zotlabs/Widget/Wiki_pages.php +++ b/Zotlabs/Widget/Wiki_pages.php @@ -2,6 +2,7 @@ namespace Zotlabs\Widget; +use Zotlabs\Lib\NativeWiki; class Wiki_pages { @@ -10,7 +11,7 @@ class Wiki_pages { return; $c = channelx_by_nick(argv(1)); - $w = \Zotlabs\Lib\NativeWiki::exists_by_name($c['channel_id'],urldecode(argv(2))); + $w = \Zotlabs\Lib\NativeWiki::exists_by_name($c['channel_id'],NativeWiki::name_decode(argv(2))); $arr = array( 'resource_id' => $w['resource_id'], 'channel_id' => $c['channel_id'], @@ -21,8 +22,9 @@ class Wiki_pages { $can_create = perm_is_allowed(\App::$profile['uid'],get_observer_hash(),'write_wiki'); $can_delete = ((local_channel() && (local_channel() == \App::$profile['uid'])) ? true : false); - $pageName = addslashes(escape_tags(urldecode(argv(3)))); + $pageName = NativeWiki::name_decode(escape_tags(argv(3))); + $wikiname = $w['urlName']; return replace_macros(get_markup_template('wiki_page_not_found.tpl'), array( '$resource_id' => $arr['resource_id'], '$channel_address' => $arr['channel_address'], @@ -48,7 +50,7 @@ class Wiki_pages { if(! $arr['resource_id']) { $c = channelx_by_nick(argv(1)); - $w = \Zotlabs\Lib\NativeWiki::exists_by_name($c['channel_id'],urldecode(argv(2))); + $w = \Zotlabs\Lib\NativeWiki::exists_by_name($c['channel_id'],NativeWiki::name_decode(argv(2))); $arr = array( 'resource_id' => $w['resource_id'], 'channel_id' => $c['channel_id'], |