Set HTML Purifier to add target=blank on external links, this should also add rel=nofollow and rel=noopener, closing #4
This commit is contained in:
parent
608d71dc67
commit
a377eb797d
1 changed files with 1 additions and 0 deletions
|
@ -284,6 +284,7 @@ class NotesController extends Controller
|
|||
{
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$config->set('Cache.SerializerPath', storage_path() . '/HTMLPurifier');
|
||||
$config->set('HTML.TargetBlank', true);
|
||||
$purifier = new HTMLPurifier($config);
|
||||
|
||||
return $purifier->purify($html);
|
||||
|
|
Loading…
Add table
Reference in a new issue