Hard tabs converted to 4 length soft tabs.

This commit is contained in:
Kasen IO 2020-01-06 08:58:09 -05:00
parent 8124b7d4a1
commit 20f5439fa8

View file

@ -2378,19 +2378,19 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co
bool isInWhitelist = false; // assume unsafe bool isInWhitelist = false; // assume unsafe
if (ScriptEngine::getContext() == "entity_server") { if (ScriptEngine::getContext() == "entity_server") {
isInWhitelist = true; isInWhitelist = true;
} else { } else {
for (const auto& str : safeURLS) { for (const auto& str : safeURLS) {
qCDebug(scriptengine) << whitelistPrefix << "Script URL: " << scriptOrURL << "TESTING AGAINST" << str << "RESULTS IN" qCDebug(scriptengine) << whitelistPrefix << "Script URL: " << scriptOrURL << "TESTING AGAINST" << str << "RESULTS IN"
<< scriptOrURL.startsWith(str); << scriptOrURL.startsWith(str);
if (!str.isEmpty() && scriptOrURL.startsWith(str)) { if (!str.isEmpty() && scriptOrURL.startsWith(str)) {
isInWhitelist = true; isInWhitelist = true;
qCDebug(scriptengine) << whitelistPrefix << "Script approved."; qCDebug(scriptengine) << whitelistPrefix << "Script approved.";
break; // bail early since we found a match break; // bail early since we found a match
} }
} }
} }
if (!isInWhitelist) { if (!isInWhitelist) {
qCDebug(scriptengine) << whitelistPrefix << "(disabled entity script)" << entityID.toString() << scriptOrURL; qCDebug(scriptengine) << whitelistPrefix << "(disabled entity script)" << entityID.toString() << scriptOrURL;