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

@ -16,5 +16,5 @@ using System.Reflection;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("3.0.1.417")]
[assembly: AssemblyFileVersion("3.0.1.417")]
[assembly: AssemblyVersion("3.0.1.418")]
[assembly: AssemblyFileVersion("3.0.1.418")]

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);
}