[smuxi: 83/111] Engine: fixed matching URLs containing @
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi: 83/111] Engine: fixed matching URLs containing @
- Date: Sun, 16 Feb 2014 13:20:03 +0000 (UTC)
commit 00649c3f0c4fd5ecc3f94cf8352a684ac568a383
Author: Mirco Bauer <meebey meebey net>
Date: Sat Jan 18 13:45:03 2014 +0100
Engine: fixed matching URLs containing @
src/Engine-Tests/MessageBuilderTests.cs | 7 +++++++
src/Engine/Config/MessageBuilderSettings.cs | 2 +-
2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/Engine-Tests/MessageBuilderTests.cs b/src/Engine-Tests/MessageBuilderTests.cs
index 54d4288..5aa4063 100644
--- a/src/Engine-Tests/MessageBuilderTests.cs
+++ b/src/Engine-Tests/MessageBuilderTests.cs
@@ -527,6 +527,13 @@ namespace Smuxi.Engine
builder.Append(new TextMessagePartModel("<knocte> meebey: does this URL highlight ok with latest
master? "));
builder.Append(new
UrlMessagePartModel("https://groups.google.com/forum/#!topic/fsharp-opensource/KLejo_vw5R4"));
TestMessage(msg, builder.ToMessage());
+
+ msg = "<astronouth7303> found another bad URL: http://www.flickr.com/photos/34962649
N00/12000715226/in/photostream/";
+ builder = new MessageBuilder();
+ builder.TimeStamp = DateTime.MinValue;
+ 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());
}
[Test]
diff --git a/src/Engine/Config/MessageBuilderSettings.cs b/src/Engine/Config/MessageBuilderSettings.cs
index 0b58e9d..7d72ac4 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]