Skip to content

Allow <br> tags while stripping or escaping all other HTML

License

Notifications You must be signed in to change notification settings

Cradeq/commonmark-br-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CommonMark Break Tag Extension

This package allows HTML break tags (<br>, <br/>, <br />) to be used in Markdown, while still escaping or stripping all other HTML input.

Install

This project can be installed via composer:

composer require cradeq/commonmark-br-extension

Usage

use Cradeq\CommonMark\BreakTagExtension;
use League\CommonMark\Environment\Environment;
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;

$environment = new Environment();
$environment->addExtension(new CommonMarkCoreExtension);
$environment->addExtension(new BreakTagExtension);

About

Allow <br> tags while stripping or escaping all other HTML

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages