Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to create a site with a title provided from a user and use the title as the site url. However I want to remove spaces and diacritics.

I replace spaces with a hyphen, and I run RemoveDiacritics as described here.

Is there a suitable method in Sharepoint API (like SPUtility or so) to achieve this goal.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Here's an article from Microsoft Support on invalid characters in Sites:

http://support.microsoft.com/default.aspx?scid=kb;en-us;905231

I'm not aware of anything in the SharePoint API that would handle this for you. You can obviously take what Microsoft puts out there in the above article and write some code and/or some regular expressions to enforce those rules. This is an article I had referenced in the past on file names...and while it's not 100% identical to the rules on site titles it's a good place to start:

http://simplyaprogrammer.com/2008/05/importing-files-into-sharepoint.html

share|improve this answer
    
Unfortunately there seems not to be a suitable method in Sharepoint API for that. But I do it as described here –  Anatoly Mironov Aug 22 '11 at 15:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.