[smuxi: 84/111] Engine(-Tests): fixed matching URLs containing :



commit bf8062500df9f0132cc42c8dd59e5a16b11b3c26
Author: Mirco Bauer <meebey meebey net>
Date:   Sat Jan 18 13:51:20 2014 +0100

    Engine(-Tests): fixed matching URLs containing :

 src/Engine-Tests/MessageBuilderTests.cs     |    6 ++++++
 src/Engine/Config/MessageBuilderSettings.cs |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/Engine-Tests/MessageBuilderTests.cs b/src/Engine-Tests/MessageBuilderTests.cs
index 5aa4063..9c45ca6 100644
--- a/src/Engine-Tests/MessageBuilderTests.cs
+++ b/src/Engine-Tests/MessageBuilderTests.cs
@@ -534,6 +534,12 @@ namespace Smuxi.Engine
             builder.Append(new TextMessagePartModel("<astronouth7303> found another bad URL: "));
             builder.Append(new UrlMessagePartModel("http://www.flickr.com/photos/34962649 
N00/12000715226/in/photostream/"));
             TestMessage(msg, builder.ToMessage());
+
+            msg = "http://en.wikipedia.org/Talk:Main_Page";;
+            builder = new MessageBuilder();
+            builder.TimeStamp = DateTime.MinValue;
+            builder.Append(new UrlMessagePartModel("http://en.wikipedia.org/Talk:Main_Page";));
+            TestMessage(msg, builder.ToMessage());
         }
 
         [Test]
diff --git a/src/Engine/Config/MessageBuilderSettings.cs b/src/Engine/Config/MessageBuilderSettings.cs
index 7d72ac4..03734b2 100644
--- a/src/Engine/Config/MessageBuilderSettings.cs
+++ b/src/Engine/Config/MessageBuilderSettings.cs
@@ -64,7 +64,7 @@ namespace Smuxi.Engine
 
         static void InitBuiltinSmartLinks()
         {
-            string path_last_chars = @"a-zA-Z0-9#/%&@=\-_+;~";
+            string path_last_chars = @"a-zA-Z0-9#/%&@=\-_+;:~";
             string path_chars = path_last_chars + @")(?!.,";
             string domainchars = @"[a-z0-9\-]+";
             string subdomain = domainchars + @"\.";


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]