summaryrefslogtreecommitdiff
path: root/svl/qa
diff options
context:
space:
mode:
authorArmin Le Grand (Allotropia) <Armin.Le.Grand@me.com>2021-12-14 14:45:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-12-15 12:26:40 +0100
commit76f29376183be48c076ada06159581ea981de3d1 (patch)
tree28801154b1ed18fa2676b31b2d4613c64c2c1f99 /svl/qa
parent4812c8df39cb03b59d8c033005e8e9dc45a260dd (diff)
tdf#145381 handle closing brackets in URLs correctly
The task presents an URL that ends with a closing bracket. If pasted to LO, the closing bracket got interpreted as not being part of the URL due to the heuristical interpretation of URLs in urihelper. Adapted this to handle matching brackets, so that an closing and ending bracket will be added to the uri text when there is a matching pair. Added unit test to testFindFirstURLInText with simplified uri example. Change-Id: I58dd460a37d0066ff46845832eabd2a790e4ccd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126832 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svl/qa')
-rw-r--r--svl/qa/unit/test_URIHelper.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/svl/qa/unit/test_URIHelper.cxx b/svl/qa/unit/test_URIHelper.cxx
index 68c76ad68374..bb3e29ee2810 100644
--- a/svl/qa/unit/test_URIHelper.cxx
+++ b/svl/qa/unit/test_URIHelper.cxx
@@ -322,6 +322,7 @@ void Test::testFindFirstURLInText() {
{ "{a:\\bla/bla/bla...}", "file:///a:/bla/bla/bla", 1, 15 },
{ "#b:/c/d#e#f#", "file:///b:/c/d", 1, 7 },
{ "a:/", "file:///a:/", 0, 3 },
+ { "http://sun.com/R_(l_a)", "http://sun.com/R_(l_a)", 0, 22 },
{ ".component:", nullptr, 0, 0 },
{ ".uno:", nullptr, 0, 0 },
{ "cid:", nullptr, 0, 0 },