diff options
author | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-03-27 13:45:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-27 13:45:15 +0300 |
commit | b78a1043d54e016c740b0553d413f17ac32c548a (patch) | |
tree | 00f3f362fb5c3bfdf50c5229379ed9a83f951359 /plugins/API/Controller.php | |
parent | 7a8689e9c858d64a2dbdb200d6a23bfaaddc49fb (diff) | |
parent | b1cd038eb7f759f3e4cea2d110b6b4721aee9e35 (diff) |
Merge pull request #11533 from piwik/3.x-dev3.0.3-b1
Release Piwik 3.0.3-b1
Diffstat (limited to 'plugins/API/Controller.php')
-rw-r--r-- | plugins/API/Controller.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/API/Controller.php b/plugins/API/Controller.php index 2d107182cb..25bfb7212d 100644 --- a/plugins/API/Controller.php +++ b/plugins/API/Controller.php @@ -16,6 +16,7 @@ use Piwik\Config; use Piwik\Piwik; use Piwik\Plugin\Report; use Piwik\Url; +use Piwik\UrlHelper; use Piwik\View; /** @@ -50,6 +51,9 @@ class Controller extends \Piwik\Plugin\Controller { $ApiDocumentation = new DocumentationGenerator(); $prefixUrls = Common::getRequestVar('prefixUrl', 'http://demo.piwik.org/', 'string'); + if (!UrlHelper::isLookLikeUrl($prefixUrls)) { + $prefixUrls = ''; + } return $ApiDocumentation->getApiDocumentationAsStringForDeveloperReference($outputExampleUrls = true, $prefixUrls); } |