]> source.dussan.org Git - redmine.git/commitdiff
Add a test for #36958.
authorMarius Balteanu <marius.balteanu@zitec.com>
Tue, 3 May 2022 16:50:52 +0000 (16:50 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Tue, 3 May 2022 16:50:52 +0000 (16:50 +0000)
Patch by Go MAEDA.

git-svn-id: https://svn.redmine.org/redmine/trunk@21559 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/lib/redmine/wiki_formatting/common_mark/external_links_filter_test.rb

index fcfc3156b23d65edfcaa648eccff7cd65f484011..d4b76c401c6c28cdf648725cb787779fd8cab1ea 100644 (file)
@@ -44,5 +44,11 @@ if Object.const_defined?(:CommonMarker)
     def test_mailto_links_should_have_email_class
       assert_equal %(<a href="mailto:user@example.org" class="email">user</a>), filter(%(<a href="mailto:user@example.org">user</a>))
     end
+
+    def test_malformed_uri_should_not_cause_exception
+      assert_nothing_raised do
+        filter(%(<a href="http://example.com/foo#bar#">Malformed URI</a>))
+      end
+    end
   end
 end