From dd12c79220fa3c436e6b47b0ba71f07a938f5666 Mon Sep 17 00:00:00 2001 From: Dario Solera Date: Fri, 23 Oct 2009 08:11:03 +0000 Subject: [PATCH] Fixed issue with '{', ':' and '}' in file links. --- AssemblyVersion.cs | 4 ++-- Core/Formatter.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/AssemblyVersion.cs b/AssemblyVersion.cs index 395639a..e46f1de 100644 --- a/AssemblyVersion.cs +++ b/AssemblyVersion.cs @@ -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")] diff --git a/Core/Formatter.cs b/Core/Formatter.cs index 976a518..5e5926d 100644 --- a/Core/Formatter.cs +++ b/Core/Formatter.cs @@ -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); }