summaryrefslogtreecommitdiff
path: root/desktop/source/app
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-04-17 12:33:13 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-04-17 23:36:58 +0200
commitf6dc5636c1eda8aebeac3f7b85dd61499523d6a3 (patch)
tree5a70b6fab30d4a8ee91cef1bf04ce10f6dab4309 /desktop/source/app
parent8b1ab55b49efca270bea7aae0f538480bd5bb1e6 (diff)
SharePoint connection: Better handling of encoded URLs
Handle %7c with small letters. Make sure that the output parameter's content is not affected by decoding. Change-Id: Ie3faad2461815497c0edfb04a589fc57aeb7d66b Reviewed-on: https://gerrit.libreoffice.org/70873 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'desktop/source/app')
-rw-r--r--[-rwxr-xr-x]desktop/source/app/cmdlineargs.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index acb266eb335e..30d0c3f4cced 100755..100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -131,25 +131,25 @@ CommandLineEvent CheckOfficeURI(/* in,out */ OUString& arg, CommandLineEvent cur
long nURIlen = -1;
// URL might be encoded
- rest1 = rest1.replaceAll("%7C", "|");
+ OUString decoded_rest = rest1.replaceAll("%7C", "|").replaceAll("%7c", "|");
// 2. Discriminate by command name (incl. 1st command argument descriptor)
// Extract URI: everything up to possible next argument
- if (rest1.startsWith("ofv|u|", &rest2))
+ if (decoded_rest.startsWith("ofv|u|", &rest2))
{
// Open for view - override only in default mode
if (curEvt == CommandLineEvent::Open)
curEvt = CommandLineEvent::View;
nURIlen = rest2.indexOf("|");
}
- else if (rest1.startsWith("ofe|u|", &rest2))
+ else if (decoded_rest.startsWith("ofe|u|", &rest2))
{
// Open for editing - override only in default mode
if (curEvt == CommandLineEvent::Open)
curEvt = CommandLineEvent::ForceOpen;
nURIlen = rest2.indexOf("|");
}
- else if (rest1.startsWith("nft|u|", &rest2))
+ else if (decoded_rest.startsWith("nft|u|", &rest2))
{
// New from template - override only in default mode
if (curEvt == CommandLineEvent::Open)