2sic / razor-blade

A pretty awesome library to make work in Razor easier and more productive
MIT License
6 stars 2 forks source link

Tags.SafeUrl() doesnt encode apostrophe in a Url #3

Closed kieran23101 closed 4 years ago

kieran23101 commented 4 years ago

I have on our website I have had to add a temporary ".Replace("'", "%27")" to fix the issue but im sure there is a much better way to do this.

Is this a bug or is it supposed to do this?

Regards

Kieran Corkin

iJungleboy commented 4 years ago

@kieran23101 not sure about this.

Seems to be a know issue https://stackoverflow.com/questions/561954/asp-net-urlencode-ampersand-for-use-in-query-string - something about backward compatibility.

If you can, please submit a change / pull request. it would be needed here https://github.com/2sic/razor-blade/blob/5ae85cf4c7bf90c5f3c7937df730b63a9a37de11/Razor.Blade/Markup/Tag/Tag_UriEncode.cs#L25