mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
parent
e24f3143b5
commit
5ed7a0ca53
@ -128,7 +128,12 @@ class BaseApiController extends BaseController
|
||||
$requestBody = $request->getParsedBody();
|
||||
foreach ($requestBody as $key => &$value)
|
||||
{
|
||||
$value = self::$htmlPurifierInstance->purify($value);
|
||||
// HTMLPurifier removes boolean values (true/false), so explicitly keep them
|
||||
// Maybe also possible through HTMLPurifier config (http://htmlpurifier.org/live/configdoc/plain.html)
|
||||
if (!is_bool($value))
|
||||
{
|
||||
$value = self::$htmlPurifierInstance->purify($value);
|
||||
}
|
||||
}
|
||||
|
||||
return $requestBody;
|
||||
|
Loading…
x
Reference in New Issue
Block a user