Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/API/Controller.php')
-rw-r--r--plugins/API/Controller.php4
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);
}