Commit 92fb4c90 authored by jrockowitz's avatar jrockowitz Committed by jrockowitz

Issue #3181949 by jrockowitz: Allow admin html in the webform_token() Twig function

parent 514309cb
......@@ -8,6 +8,7 @@ use Drupal\webform\Element\WebformMessage;
use Drupal\webform\Utility\WebformElementHelper;
use Drupal\webform\Utility\WebformHtmlHelper;
use Drupal\webform\Utility\WebformLogicHelper;
use Drupal\webform\Utility\WebformXss;
use Drupal\webform\Utility\WebformYaml;
use Drupal\webform\WebformSubmissionInterface;
......@@ -132,7 +133,7 @@ class WebformTwigExtension extends \Twig_Extension {
return '';
}
return (WebformHtmlHelper::containsHtml($value)) ? ['#markup' => $value] : $value;
return (WebformHtmlHelper::containsHtml($value)) ? ['#markup' => $value, '#allowed_tags' => WebformXss::getAdminTagList()] : $value;
}
/****************************************************************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment