"&zwj" character added when using html helper

When I use <?=Html::a(’<h2 class=“center-align”>‍هدیه برای مشتریان </h2>’, Url::to(“http://google.com”, true),[‘calss’=>‘center’]);?>

a "&zwj" character is added to h2 text, in the attached image you can see the difference using yii html helper or the simple html approach in RTL languages, Is there any way to fix it ?

Is the character anywhere in Html helper code? What’s adding it?

That’s the problem, I searched the BaseHtml in yii helpers but no such character is there, I am wondering why when I copy the same text from simple html into the helper I get that &zwj character!

May not help, but I don’t think you need to URL::to() bit for a external link. Just put (“http://google.com” for the Url.

yeah that was just a test, it actually isn’t an external link :)

and it is not the URL::to() that causes the issue but the Html::a() adds the character

the only thing I can think of, is to delete the code row, and re-enter it. I have had times that that was only thing that would fix a weird thing like this. Some kind of glitch that wouldn’t show in the editor, but was there.

Oh thanks :) , I donno why I didn’t think about that myself as it is more common in RTL languages, maybe because copying the text in normal HTML was working fine, but you were right, I typed it again from scratch and it works! ;D

Sometimes you’ve got to check the fuse :blink: