Plus sign converts to + in nop 41 but resolve into 42beta

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
My website is build with nopcommerce41. Url character replace with + if url having + character(this display into source view of browser).  
everythink working fine into website. now google search result display url look like "www.demo.com?search=+apple" but bing search engine display this same url look like "www.demo.com?search=+apple". if user come from bing search engine then user cant find expected result.
now i have compare code of both version that is nopcommerce41 and nopcommerce42beta and result is got as below.

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 team already fixed this issue into nopcommrce 4.2beta but i dont want to upgrade my project. can any one help me to solve this issue?  


this issue already reported into development section but this is bug so i have posted here.
https://www.nopcommerce.com/boards/t/62489/plus-sign-converts-to-x2b-in-nopcommerce-versions-running-on-net-core.aspx
4 years ago
Try this:

WebUtility.UrlDecode(text);
4 years ago
nop-world.com wrote:
Try this:

WebUtility.UrlDecode(text);



i know this solution. but this issue come into whole project now how many place i need to do this?
4 years ago
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>



second dynamic string + symbol convert into &#x2B;(Unicode Hex Character Code) but first static value not converted.
4 years ago
anyone having any idea?
4 years ago
Problem is solved. using HttpCompression(AddNopWebMarkupMin) problem is solved. this method compress the code also also prevent to convert to Unicode Hex Character Code.


public class NopMvcStartup : INopStartup
{
            //add WebMarkupMin services to the services container
            services.AddNopWebMarkupMin();
}

above method need to include into NopMvcStartup to solve this problem.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.