Skip to content

Commit

Permalink
Don't decode when URL has no encoded characters
Browse files Browse the repository at this point in the history
  • Loading branch information
dedmen authored Jan 4, 2020
1 parent 4e6845e commit 6608ec6
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 need to check if there is atleast one character to replace in the stirng
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 6608ec6

Please sign in to comment.