lajax / yii2-translate-manager

Translation Manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Frontend translation of strings in hidden tags corrupts HTML

maxxer opened this issue · comments

Given this code in frontend:

<input id="sys_txt_keyword" class="txt-keyword" type="text" placeholder="<?=Lx::t("trusthau", "Search Actions")?>"/>

the resulting HTML is

<input id="sys_txt_keyword" class="txt-keyword" type="text" placeholder="<span class="language-item" data-category="trusthau" data-hash="5fdaa9de184eb548e41805c2be378e9d" data-language_id="it-IT" data-params="[]">Search Actions</span>"/>

which is invalid...

I don't know if you want to fix Lx::t or just add in the documentation not to use it in non viewable strings

Thanks!