mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Icons/Names
* icon names can contain spaces. So indiscriminate trimming should be discouraged. * ... * unrelated stuff: please don't break...
This commit is contained in:
@@ -666,7 +666,7 @@ class Util
|
|||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
return htmlspecialchars(trim($data), ENT_QUOTES, 'utf-8');
|
return htmlspecialchars($data, ENT_QUOTES, 'utf-8');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function jsEscape($data)
|
public static function jsEscape($data)
|
||||||
@@ -679,7 +679,7 @@ class Util
|
|||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
return strtr(trim($data), array(
|
return strtr($data, array(
|
||||||
'\\' => '\\\\',
|
'\\' => '\\\\',
|
||||||
"'" => "\\'",
|
"'" => "\\'",
|
||||||
'"' => '\\"',
|
'"' => '\\"',
|
||||||
@@ -809,6 +809,8 @@ class Util
|
|||||||
return false;
|
return false;
|
||||||
else if (!is_array($data))
|
else if (!is_array($data))
|
||||||
{
|
{
|
||||||
|
$rawData = $data; // do not transform strings
|
||||||
|
|
||||||
$data = trim($data);
|
$data = trim($data);
|
||||||
if (preg_match('/^-?\d*,\d+$/', $data))
|
if (preg_match('/^-?\d*,\d+$/', $data))
|
||||||
$data = strtr($data, ',', '.');
|
$data = strtr($data, ',', '.');
|
||||||
@@ -830,6 +832,7 @@ class Util
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$data = $rawData;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user