Skip to content
Snippets Groups Projects
Commit d6b6c21d authored by Till Glöggler's avatar Till Glöggler Committed by Elmar Ludwig
Browse files

fixes #489

parent c32dfa3e
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,22 @@ class Text extends BlockType ...@@ -35,6 +35,22 @@ class Text extends BlockType
return ['text' => '']; return ['text' => ''];
} }
public function getPayload()
{
$payload = parent::getPayload();
$payload['text'] = \Studip\Markup::purifyHtml(\Studip\Markup::markAsHtml($payload['text']));
return $payload;
}
public function setPayload($payload): void
{
$payload['text'] = \Studip\Markup::purifyHtml(\Studip\Markup::markAsHtml($payload['text']));
parent::setPayload($payload);
}
public static function getJsonSchema(): Schema public static function getJsonSchema(): Schema
{ {
$schemaFile = __DIR__.'/Text.json'; $schemaFile = __DIR__.'/Text.json';
...@@ -42,7 +58,7 @@ class Text extends BlockType ...@@ -42,7 +58,7 @@ class Text extends BlockType
return Schema::fromJsonString(file_get_contents($schemaFile)); return Schema::fromJsonString(file_get_contents($schemaFile));
} }
/** /**
* get all files related to this block. * get all files related to this block.
* *
* @return \FileRef[] list of file references realted to this block * @return \FileRef[] list of file references realted to this block
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment