Fixed issue with '{', ':' and '}' in file links.

This commit is contained in:
Dario Solera 2009-10-23 08:11:03 +00:00
parent 18b2d4d66c
commit dd12c79220
2 changed files with 4 additions and 3 deletions

View file

@ -884,7 +884,8 @@ namespace ScrewTurn.Wiki {
int endIndex = allData.IndexOfAny(new[] { '|', ']' }, startIndex);
if(endIndex > startIndex) {
int len = endIndex - startIndex;
string value = Tools.UrlEncode(allData.Substring(startIndex, len));
// {, : and } are used in snippets which are useful in links
string value = Tools.UrlEncode(allData.Substring(startIndex, len)).Replace("%7b", "{").Replace("%7B", "{").Replace("%7d", "}").Replace("%7D", "}").Replace("%3a", ":").Replace("%3A", ":");
buffer.Remove(startIndex, len);
buffer.Insert(startIndex, value);
}