public function ParsedMarkdown::setAllowedTags in Markdown 3.0.x
Sets the allowed tags.
Parameters
array|true $allowed_tags: Optional. An array of allowed HTML tags that are permitted in the parsed HTML to ensure it is safe from XSS vulnerabilities. Pass TRUE if all tags are allowed.
Return value
static
Overrides ParsedMarkdownInterface::setAllowedTags
File
- src/
ParsedMarkdown.php, line 230
Class
Namespace
Drupal\markdownCode
public function setAllowedTags($allowed_tags = self::ALLOWED_TAGS) {
if ($allowed_tags !== TRUE && !is_array($allowed_tags)) {
$allowed_tags = static::ALLOWED_TAGS;
}
$this->allowedTags = $allowed_tags;
return $this;
}