加号在 nopCommerce 41 中转换为 +,但解析为 42beta



我的网站是使用nopcommerce41构建的。' '字符在运行时被&#x2B替换。除此问题外,一切都很好。

示例:Google搜索结果显示URL看起来像www.demo.com?search=+apple,但Bing搜索引擎显示同一URL看起来像www.demo.com?search=+apple

如果用户来自Bing搜索引擎,则用户找不到预期的结果。现在,我已经比较了NopCommerce41和NopCommerce42Beta的两个版本的代码,结果如下所示:

view-source:http://nop42beta-001-site1.ftempurl.com/ (this site into 4.2beta)
e.g. <li class=facebook><a href=//www.facebook.com/+nopCommerce target=_blank>Facebook</a>
view-source:http://demo.nopcommerce.com/ (this site into 4.1)
e.g. <a href="https://plus.google.com/&#x2B;nopcommerce" target="_blank">Google+</a>

nopcommerce团队已经将此问题修复到NopCommrce 4.2Beta中,但我不想升级我的项目。有人可以帮助我解决这个问题吗?

这个问题已经报告到开发部分中,但这是一个有问题的错误,所以我在这里发布了。https://www.nopcommerce.com/boards/t/62489/plus-sign-converts-to-x2b-x2b-in-nopcommerce-commerce-versions-onnet-net-core.aspx

一个理解此问题的例子

one more example as below:-
In a Index.chtml file i have write code
@{ 
    Layout = null;
    var test1 = "/+apple";
}
<a href="/+apple">Sangeet1</a>
<a href="@test1">Sangeet2</a>

now i have run project then i got result as below
view-source:http://localhost:15543/

<a href="/+apple">Sangeet1</a>
<a href="/&#x2B;apple">Sangeet2</a>

第二个动态字符串 符号将转换为&#x2b;(Unicode十六进制字符代码(,但第一个静态值未转换。

nocommerce是开源的,您可以找到解决问题的更改,并使用此特定修复程序构建4.1版本

最新更新