kbsali / php-redmine-api

A simple PHP Redmine API client, Object Oriented

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wiki page title must be urlencoded

Art4 opened this issue · comments

Creating a wiki page requires a page title. This page title will be part of the endpoint, like PUT /projects/foo/wiki/testpage.xml.

If you provide a page title with a space ( ) a Redmine\Exception\ClientException will be thrown.

Example:

$pageTitle = 'test page';

$client->getApi('wiki')->create($projectIdentifier, $pageTitle, [
    'text' => '# First Wiki page',
]);

If the page title is urlencoded (test%20page), the wiki page will be created.