Encodes an item path.
The encoded path.
It can be necessary to encode item names to ensure working friendly URLs. For instance the item name "Bruun & Rasmussen" contains the character "&" which is URL automatically escaped by most browsers.
The encoding is configured in the web.config section <encodeNameReplacements>.
string encodedPath = MainUtil.EncodePath("/home/Bruun & Rasmussen"); // "/home/Bruun ,-a-, Rasmussen"
MainUtil Class | Sitecore Namespace | DecodeName