More in this section
Forums / Suggestions / Excessive Dashes :)

Excessive Dashes :)

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    03 Dec 2008
    18 Aug 2011
    Link to this post
    So if my item is "Hello - There.pdf" when uploaded the URL is (by default) "hello---there.pdf"

    Could you perhaps filter out the redundant dashes?...or give me the option in settings to do that?
  2. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    03 Nov 2014
    23 Aug 2011
    Link to this post
    Hi Steve,

    Unfortunately I don't believe there is a way to easily modify this behaviour. If you can manage to do that then the C# code to remove repeated dashes is rather simple:

    var reducedString = Regex.Replace(inputString, "-+", "-");
    var finalString = reducedString.Trim('-');

    All the best,
    Lubomir Velkov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

2 posts, 0 answered