diff --git a/src/Forms/Controls/BaseControl.php b/src/Forms/Controls/BaseControl.php index 841ddf155..e9e21176f 100644 --- a/src/Forms/Controls/BaseControl.php +++ b/src/Forms/Controls/BaseControl.php @@ -276,7 +276,7 @@ public function getLabel($caption = null) $label->for = $this->getHtmlId(); $caption = $caption === null ? $this->caption : $caption; $translator = $this->getForm()->getTranslator(); - $label->setText($translator ? $translator->translate($caption) : $caption); + $label->setText($translator && !$caption instanceof Nette\Utils\IHtmlString ? $translator->translate($caption) : $caption); return $label; }