disallow backslashes in wiki and wiki-page names

This commit is contained in:
zotlabs
2017-12-05 16:33:24 -08:00
parent d4acf41192
commit 8451ee20c9
2 changed files with 18 additions and 6 deletions

View File

@@ -68,6 +68,9 @@ class NativeWikiPage {
return array('content' => null, 'message' => 'Error reading wiki', 'success' => false);
}
// backslashes won't work well in the javascript functions
$name = str_replace('\\','',$name);
// create an empty activity
$arr = [];
@@ -351,6 +354,7 @@ class NativeWikiPage {
// fetch the most recently saved revision.
$item = self::load_page($arr);
if(! $item) {
return array('message' => t('Page not found'), 'success' => false);
}