Meta Keywords are truncating spaces after commas

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
I have observed that the meta keywords value is removing spaces after commas in the file

"Presentation\Nop.Web\Views\Shared\_Root.Head.cshtml"

<head>
    <title>@Html.NopTitle()</title>
    <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
    <meta name="description" content="@(Html.NopMetaDescription())" />
    <meta name="keywords" content="@(Html.NopMetaKeywords())" />
    <meta name="generator" content="nopCommerce" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    @Html.NopHeadCustom()


I also tried hardcoding the values like the below code but still somehow the spaces after comma is being removed.

<head>
    <title>@Html.NopTitle()</title>
    <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
    <meta name="description" content="@(Html.NopMetaDescription())" />
    <meta name="keywords" content="abc, 123, xyz" />
    <meta name="generator" content="nopCommerce" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    @Html.NopHeadCustom()


However, this is not the case with meta description tag. I tried to compare the code for both NopMetaDescription and NopMetaKeywords but did not find any differences.

So, if anybody have any idea about the actual code where this logic has been written. My SEO guy has told me that there are some issues in crawling with the keywords without spaces so, need to add spaces.
3 years ago
It doesn't really matter if you use space after comma or not
ref:
1. https://stackoverflow.com/questions/63637766/should-i-put-a-space-after-a-comma-in-the-meta-keywords-tag
2. https://webmasters.stackexchange.com/questions/92744/is-there-any-difference-between-writing-meta-keywords-with-or-without-space
3 years ago
Yes, I have this idea that spaces does not matter but now I am little bit curious to know the exact place where this logic has been implemented in nopcommerce framework. This may be helpful for me in implementing a requirement of the client and that code will be useful for me.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.