Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
We can define urlReplacing in /config/umbracoSettings.config under RequestHandler
<char org="à">a</char> <char org="á">a</char>
Is this available in Umbraco.Core? Something like this:
var myCustomUrl = "this is a unsafe url àá that needs char replace %+* :)"; var safeUrl = Umbraco.Core.something.UrlReplacing(myCustomUrl);
Thank you, Adão
Hi Pedro
Just use ToUrlSegment() extention method like this:
myCustomUrl.ToUrlSegment()
It will return safe and great url segment the same as Umbraco do it. So your code will be:
var myCustomUrl = "this is a unsafe url àá that needs char replace %+* :)"; var safeUrl = myCustomUrl.ToUrlSegment();
Thanks,
Alex
Thank you @Alex Skrypnyk ! =)
You are welcome!!!
Have a nice day!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Umbraco Core how to use urlReplacing
Hi,
We can define urlReplacing in /config/umbracoSettings.config under RequestHandler
Is this available in Umbraco.Core? Something like this:
Thank you, Adão
Hi Pedro
Just use ToUrlSegment() extention method like this:
It will return safe and great url segment the same as Umbraco do it. So your code will be:
Thanks,
Alex
Thank you @Alex Skrypnyk ! =)
You are welcome!!!
Have a nice day!
is working on a reply...