I discovered some strange behaviour in the "alert me" functionality of Sharepoint Online. I've set up a alert on a file with the name "CRM process approvals: XYZ.pdf". I recieve a email when something changes in the file, but the url isn't working. The URL I expect:


The url in the alert email:


I tried this with multiple file names, but it seems that it is double encoding the URLs and showing '%2520' instead of '%20'. How to solve this?

  • Does your filename indeed include : (colon) in it? If it does, this will cause the URL to become encoded, and as spaces are pre-encoded to %20, this causes the "double-encoding" where %20 is divided into %25+20 = %2520.
    – moe
    Jun 21, 2017 at 6:43
  • @moe Thanks. It also happens with files without any special characters.
    – Citizen SP
    Jun 21, 2017 at 7:33
  • 1
    I'm still quite convinced that if you have files with restricted characters in their name, such as :, it affects all of the files from the same library/folder. See what are the restricted characters. If possible, could you try to reproduce the behavior on another location where are no files using restricted characters in their name?
    – moe
    Jun 21, 2017 at 8:55

1 Answer 1


%20 is encoded value for Space in '%20' we are having %, for this % symbol encoded value is %25 so here space encoded value is %2520

use Uri.EscapeDataString() for encoding and Uri.UnescapeDataString() for decoding.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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