summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/redcloth.rb2
-rw-r--r--test/unit/helpers/application_helper_test.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/redcloth.rb b/lib/redcloth.rb
index 42eddd8e0..59d02fbab 100644
--- a/lib/redcloth.rb
+++ b/lib/redcloth.rb
@@ -786,7 +786,7 @@ class RedCloth < String
\s?
(?:\(([^)]+?)\)(?="))? # $title
":
- (\S+?) # $url
+ ([\w\/]\S+?) # $url
(\/)? # $slash
([^\w\/;]*?) # $post
(?=<|\s|$)
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb
index 7fa96d7e2..c6afdda0e 100644
--- a/test/unit/helpers/application_helper_test.rb
+++ b/test/unit/helpers/application_helper_test.rb
@@ -59,6 +59,7 @@ class ApplicationHelperTest < HelperTestCase
'This is a "link":http://foo.bar' => 'This is a <a href="http://foo.bar" class="external">link</a>',
'This is an intern "link":/foo/bar' => 'This is an intern <a href="/foo/bar">link</a>',
'"link (Link title)":http://foo.bar' => '<a href="http://foo.bar" title="Link title" class="external">link</a>',
+ "This is not a \"Link\":\n\nAnother paragraph" => "This is not a \"Link\":</p>\n\n\n\t<p>Another paragraph",
# no multiline link text
"This is a double quote \"on the first line\nand another on a second line\":test" => "This is a double quote \"on the first line<br />\nand another on a second line\":test"
}