From fd7d38090bb4186e68887fa3a8969dc64278998e Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Fri, 10 Sep 2010 21:05:35 +0000 Subject: [PATCH] Punctuation marks are excluded from links in ubbparser --- Builder/IISMainHandler/build.txt | 2 +- Common/UBBParser.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index f0236b5..64e9c64 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -1215 \ No newline at end of file +1219 \ No newline at end of file diff --git a/Common/UBBParser.cs b/Common/UBBParser.cs index 4abc6e2..9f072a9 100644 --- a/Common/UBBParser.cs +++ b/Common/UBBParser.cs @@ -63,7 +63,9 @@ namespace FLocal.Common { private static readonly Regex LINKS_MATCHER = new Regex("https?://[^\\s\\[<]+", RegexOptions.Singleline | RegexOptions.Compiled); private static string LINKS_REPLACE(Match match) { - return BBCodes.UrlProcessor.ProcessLink(match.Value, null, true); + string url = match.Value.TrimEnd('!', '?', ',', '.'); + string remainder = match.Value.Substring(url.Length); + return BBCodes.UrlProcessor.ProcessLink(url, null, true) + remainder; } private static readonly Dictionary TYPOGRAPHICS = new Dictionary {