mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-15 12:11:45 +00:00
- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user