From f0feaba1ff281a92ff7704b8a1ae143f5300e481 Mon Sep 17 00:00:00 2001 From: mjk Date: Mon, 31 Oct 2022 21:39:09 +0000 Subject: fix: URI parsing: More robustness with geo URIs * Don't treat altitude as part of longitude * Detect more invalid URIs --- test/no_gui/test_styling.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/no_gui/test_styling.py b/test/no_gui/test_styling.py index af6ed9f83..6579bfb8f 100644 --- a/test/no_gui/test_styling.py +++ b/test/no_gui/test_styling.py @@ -301,6 +301,8 @@ URIS = [ 'xmpp:%23room%25irc.example@biboumi.xmpp.example', 'xmpp:+15551234567@cheogram.com', 'xmpp:romeo@montague.net?message;subject=Test%20Message;body=Here%27s%20a%20test%20message', + 'geo:1,2', + 'geo:1,2,3', # These seem to be from https://mathiasbynens.be/demo/url-regex 'http://foo.com/blah_blah', @@ -405,6 +407,16 @@ UNACCEPTABLE_URIS = [ 'http://##', 'http://##/', 'http:///a', + + 'geo:1,', + 'geo:,2', + #'geo:1,2,', FIXME: wrongly parsed as valid + 'geo:1,,3', + 'geo:,2,3', + 'geo:1,,', + 'geo:,2,', + 'geo:,,3', + 'geo:,,', ] -- cgit v1.2.3