Skip to content

Commit b8d3a7c

Browse files
MilanPaladg
authored andcommitted
BaseControl::getLabel() IHtmlString are not translated (#225)
1 parent 9982f49 commit b8d3a7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Forms/Controls/BaseControl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public function getLabel($caption = null)
276276
$label->for = $this->getHtmlId();
277277
$caption = $caption === null ? $this->caption : $caption;
278278
$translator = $this->getForm()->getTranslator();
279-
$label->setText($translator ? $translator->translate($caption) : $caption);
279+
$label->setText($translator && !$caption instanceof Nette\Utils\IHtmlString ? $translator->translate($caption) : $caption);
280280
return $label;
281281
}
282282

0 commit comments

Comments
 (0)