mirror of
https://github.com/grocy/grocy.git
synced 2025-08-07 06:53:30 +00:00
Allow some HTML tags in API request body (needed at least for HTML editor fields) (fixes #1228)
This commit is contained in:
parent
87754830f7
commit
d9e42331f9
@ -15,3 +15,4 @@
|
|||||||
- Fixed that the success message on purchase displayed no amount when `FEATURE_FLAG_STOCK_PRICE_TRACKING` was disabled
|
- Fixed that the success message on purchase displayed no amount when `FEATURE_FLAG_STOCK_PRICE_TRACKING` was disabled
|
||||||
- Fixed that adding items to the shopping list from the context/more menu on the stock overview page did not work
|
- Fixed that adding items to the shopping list from the context/more menu on the stock overview page did not work
|
||||||
- Fixed that consuming was not possible when `FEATURE_FLAG_STOCK_LOCATION_TRACKING` was disabled
|
- Fixed that consuming was not possible when `FEATURE_FLAG_STOCK_LOCATION_TRACKING` was disabled
|
||||||
|
- Fixed that adding images in text editor fields did not work
|
||||||
|
@ -202,7 +202,12 @@ class BaseController
|
|||||||
{
|
{
|
||||||
if (self::$htmlPurifierInstance == null)
|
if (self::$htmlPurifierInstance == null)
|
||||||
{
|
{
|
||||||
self::$htmlPurifierInstance = new \HTMLPurifier(\HTMLPurifier_Config::createDefault());
|
$htmlPurifierConfig = \HTMLPurifier_Config::createDefault();
|
||||||
|
$htmlPurifierConfig->set('HTML.Allowed', 'div,b,strong,i,em,u,a[href|title],ul,ol,li,p[style],br,span[style],img[width|height|alt|src],table[border|width|style],tbody,tr,td,th,blockquote');
|
||||||
|
$htmlPurifierConfig->set('CSS.AllowedProperties', 'font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align');
|
||||||
|
$htmlPurifierConfig->set('URI.AllowedSchemes', ['data' => true]);
|
||||||
|
|
||||||
|
self::$htmlPurifierInstance = new \HTMLPurifier($htmlPurifierConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
$requestBody = $request->getParsedBody();
|
$requestBody = $request->getParsedBody();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user