Bugfix: Made sure that the first parameter has a leading '?'
This commit is contained in:
parent
f3db10dc0a
commit
46aa2b89c3
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required (VERSION 3.7)
|
||||
project (expandurl-mastodon
|
||||
VERSION 0.9.0
|
||||
VERSION 0.9.1
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
|
|
|
@ -89,6 +89,14 @@ const string strip(const string &url)
|
|||
(*it).asString());
|
||||
}
|
||||
|
||||
// If '&' is found in the new URL, but no '?'
|
||||
if (newurl.find('&') != std::string::npos &&
|
||||
newurl.find('?') == std::string::npos)
|
||||
{
|
||||
size_t pos = newurl.find('&');
|
||||
newurl.replace(pos, 1, "?");
|
||||
}
|
||||
|
||||
return newurl;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user