Entity encode while translating some markdown tags to HTML equivalents
If you specify boolean TRUE for the
$options argument, full markdown is applied. Otherwise,
only basic markdown allowed, as outlined in the examples.
The primary reason to use this over full-on Markdown is that it has less overhead
and is faster then full-blown Markdown, for when you don't need it. It's also safer
for text coming from user input since it doesn't allow any other HTML. But if you just
want full markdown, then specify TRUE for the
Basic allowed markdown currently includes:
- code surrounded by backticks
// basic markdown echo $sanitizer->entitiesMarkdown($str); // full markdown echo $sanitizer->entitiesMarkdown($str, true);
// basic usage $string = $sanitizer->entitiesMarkdown(string $str); // usage with all arguments $string = $sanitizer->entitiesMarkdown(string $str, $options = );
String to apply markdown to
Options include the following, or specify boolean TRUE to apply full markdown.
Formatted with a flavor of markdown
API reference based on ProcessWire core version 3.0.109