- Urgent fix to NTSL. Sanitizes the output of NTSL, including the broadcast() function.

- Added a GetCleanVar to be used when getting a global variable to use inside the game code, it will sanitize() the variable if the compare argument is not equal to it; the compare argument should used to see if NTSL has changed the value.
 - Added a sanitize_data proc for the signal datum. It will sanitize all the data using strip_html_simple().
This commit is contained in:
Giacomand
2013-03-12 16:50:28 +00:00
parent 5b8799bc52
commit af525cb75b
3 changed files with 27 additions and 7 deletions

View File

@@ -110,6 +110,17 @@
var/x = globalScope.variables[name]
return Eval(x)
/*
Proc: GetCleanVar
Returns the value of a global variable in the script and cleans it (sanitizes).
*/
GetCleanVar(name, compare)
var/x = GetVar(name)
if(istext(x) && compare && x != compare) // Was changed
x = sanitize(x)
return x
/*
Proc: CallProc
Calls a global function defined in the script and, amazingly enough, returns its return value. Remember to ensure that the function