mikeedwards83 / Glass.Mapper

Version 5 of the Glass mapping framework, the best ORM for Sitecore.
Apache License 2.0
124 stars 122 forks source link

RenderLink and BeginRenderLink is not working when there is a hash tag '#' in the URL #112

Closed peng-at-gruden closed 9 years ago

peng-at-gruden commented 9 years ago

Hi,

We are using 7.5 (rev. 150212) and the latest Glass.Mapper.sc (Web Forms):

We just found if there is a "#" in the general link field, the output link by "RenderLink" and BeginRenderLink is not working. For example: http://www.seek.com.au/jobs/in-australia/#dateRange=999&workType=0&industry=&occupation=&graduateSearch=false&salaryFrom=0&salaryTo=999999&salaryType=annual&advertiserID=&advertiserGroup=&keywords=sitecore+developer&page=1&displaySuburb=&seoSuburb=&isAreaUnspecified=false&location=&area=&nation=3000&sortMode=KeywordRelevance&searchFrom=filters&searchType=

The result of "RenderLink" and "BeginRenderLink" is: http://www.seek.com.au/jobs/in-australia/#dateRange=999&workType=0&industry=&occupation=&graduateSearch=false&salaryFrom=0&salaryTo=999999&salaryType=annual&advertiserID=&advertiserGroup=&keywords=sitecore+developer&page=1&displaySuburb=&seoSuburb=&isAreaUnspecified=false&location=&area=&nation=3000&sortMode=KeywordRelevance&searchFrom=filters&searchType=?workType=0&searchType=&sortMode=KeywordRelevance&salaryType=annual&page=1&displaySuburb=&http://www.seek.com.au/jobs/in-australia/#dateRange=999&keywords=sitecore+developer&area=&isAreaUnspecified=false&advertiserID=&salaryFrom=0&nation=3000&seoSuburb=&occupation=&salaryTo=999999&searchFrom=filters&graduateSearch=false&industry=&location=&advertiserGroup=

The wrong output cause the keywords missing in the seek.com.

The sitecore default sc:Link tag is working though.

mikeedwards83 commented 9 years ago

Hi

A fix has been pushed into the develop branch and can be downloaded from the Glass Build server:

http://build.glass.lu/viewType.html?buildTypeId=bt6

For information on how to download from the build server please see the Pre-release versions documentation:

http://www.glass.lu/Mapper/Download.aspx#prerelease

The unit tests for your issue can be found here:

https://github.com/mikeedwards83/Glass.Mapper/blob/develop/Tests/Unit%20Tests/Glass.Mapper.Sc.Tests/GlassHtmlFixture.cs#L258

Let me know if this solves your problem and we can look to promote this to an official release soon.

Mike

peng-at-gruden commented 9 years ago

Thanks Mike, it works!