You are here

public function MarkdownParserInterface::convertToHtml in Markdown 3.0.x

Converts Markdown into HTML.

Note: this method is not guaranteed to be safe from XSS attacks. This returns the raw output from the parser itself. If you need to render this output you should wrap it in a ParsedMarkdown object or use the \Drupal\markdown\Plugin\Markdown\MarkdownParserInterface::parse() method instead.

Parameters

string $markdown: The markdown string to convert.

\Drupal\Core\Language\LanguageInterface $language: Optional. The language of the text that is being converted.

Return value

string The raw parsed HTML returned from the parser.

See also

\Drupal\markdown\ParsedMarkdownInterface

\Drupal\markdown\Plugin\Markdown\MarkdownParserInterface::parse()

1 method overrides MarkdownParserInterface::convertToHtml()
BaseParser::convertToHtml in src/Plugin/Markdown/BaseParser.php
Converts Markdown into HTML.

File

src/Plugin/Markdown/MarkdownParserInterface.php, line 33

Class

MarkdownParserInterface
Interface MarkdownInterface.

Namespace

Drupal\markdown\Plugin\Markdown

Code

public function convertToHtml($markdown, LanguageInterface $language = NULL);