Don't allow raw double quotes in dashlet URLs

This commit is contained in:
Alexander A. Klimov 2016-02-23 13:33:58 +01:00
parent b7bdf2e8d4
commit 21eeeea7ea

View File

@ -5,6 +5,7 @@ namespace Icinga\Forms\Dashboard;
use Icinga\Web\Widget\Dashboard; use Icinga\Web\Widget\Dashboard;
use Icinga\Web\Form; use Icinga\Web\Form;
use Icinga\Web\Form\Validator\UrlValidator;
use Icinga\Web\Url; use Icinga\Web\Url;
use Icinga\Web\Widget\Dashboard\Dashlet; use Icinga\Web\Widget\Dashboard\Dashlet;
@ -68,7 +69,8 @@ class DashletForm extends Form
'label' => $this->translate('Url'), 'label' => $this->translate('Url'),
'description' => $this->translate( 'description' => $this->translate(
'Enter url being loaded in the dashlet. You can paste the full URL, including filters.' 'Enter url being loaded in the dashlet. You can paste the full URL, including filters.'
) ),
'validators' => array(new UrlValidator())
) )
); );
$this->addElement( $this->addElement(