Posts
read more
javascript: Remove illegal characters in url
Recently I needed to create valid urls for pages using javascript. Also this time I thought it must be some out-of-the-box code for that in SharePoint. The first thing I came up was the “Add page” dialog. I found that the actual dialog was in the _layouts virtual folder:
/_layouts/15/CreatePublishingPageDialog.aspxBingo, it does the validation in the client side. This is the responsible javascript function that resides directly in the page: