Skip to content

Commit

Permalink
fix(descriptionfield): picture rendering in user form
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Feb 7, 2022
1 parent a5b4186 commit ddff108
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inc/field/descriptionfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

use PluginFormcreatorAbstractField;
use Session;
use Toolbox;
use GlpiPlugin\Formcreator\Exception\ComparisonException;

class DescriptionField extends PluginFormcreatorAbstractField
Expand All @@ -56,7 +57,8 @@ public function getDesignSpecializationField(): array {
}

public function getRenderedHtml($domain, $canEdit = true): string {
return nl2br(html_entity_decode(__($this->question->fields['description'], $domain)));
$value = Toolbox::convertTagToImage(__($this->question->fields['description'], $domain), $this->getQuestion());
return nl2br(html_entity_decode($value));
}

public function serializeValue(): string {
Expand Down

0 comments on commit ddff108

Please sign in to comment.