Skip to content

Commit

Permalink
Merge pull request #1275 from dedmen/patch-7
Browse files Browse the repository at this point in the history
Don't URLdecode when URL has no encoded characters
  • Loading branch information
commy2 authored Jan 11, 2020
2 parents d1113f3 + 19bdcd8 commit d2c93f2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions addons/strings/fnc_decodeURL.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ private _return = _cache getVariable _string;

if (isNil "_return") then {
_return = _string;

{
_return = ([_return] + _x) call CBA_fnc_replace;
} forEach UTF8_TABLE;


// Only replace if there is at least one character to replace
if ("%" in _return) then {
{
_return = ([_return] + _x) call CBA_fnc_replace;
} forEach UTF8_TABLE;
};
if (isNull _cache) then {
_cache = [] call CBA_fnc_createNamespace;
missionNamespace setVariable [QGVAR(URLCache), _cache];
Expand Down

0 comments on commit d2c93f2

Please sign in to comment.