0

Using ASP.NET Core 3.1 MVC, I tried to generate my links as below (notice using non English language, RTL I mean)

<a asp-area="User" asp-controller="Item" asp-action="item" asp-route-itemTitle="@Html.Raw(item.PersianTitle)" asp-route-cityName=@Html.Raw("اصفهان")> @Html.Raw(item.PersianTitle)</a>

Every thing is good on the page, but at page source, Html.Raw doesn't render the link in Persian and the link is shown as

 href="/%DA%A9%D9%84%DB%8C%D8%AF-%D8%B3%D8%A7%D8%B2%DB%8C-%D9%87%D8%A7/%25D8%25A7%25D8%25B5%25D9%2581%25D9%2587%25D8%25A7%25D9%2586"

However clicking on the link, create a correct Persian URL and is working truly, but I want to know if it is bad for SEO to render the link encoded mode, and if I can render the link on source page to be seen in Persian too.

Summary : make my href to be rendered on page source correctly in Persian languages, the following code is not effective :

asp-route-PersianTitle="@Html.Raw(item.PersianTitle)" 
  • I asked my question in `asp.forum,net` and I found the answer here : https://stackoverflow.com/questions/34332307/seo-canonical-url-in-greek-characters – ehsan_kabiri_33 Oct 19 '20 at 06:49

0 Answers0