Sanitize less/greater-than symbol to square

Fix #2912
The raw `<` showed up in nametags and anything besides strucText
`[ / ]` is fairly close and will work in either text mode.
This commit is contained in:
PabstMirror 2015-12-10 23:29:05 -06:00
parent 8e6a057f52
commit c7b6375092

View File

@ -7,7 +7,10 @@
* 1: Remove html tags (default: false) <BOOL>
*
* Return Value:
* Sanitized string
* Sanitized string <STRING>
*
* Example:
* ["<CoolGroup>CoolGuy", true] call ace_common_fnc_sanitizeString;
*
* Public: Yes
*/
@ -20,16 +23,16 @@ _array = [];
{
switch _x do {
case 60 : {
case 60 : { // less than symbol: `<`
if (_removeTags) then {
_array append toArray "&lt;";
_array append toArray "[";
} else {
_array pushBack _x;
};
};
case 62 : {
case 62 : { // greater than symbol: `>`
if (_removeTags) then {
_array append toArray "&gt;";
_array append toArray "]";
} else {
_array pushBack _x;
};