Commit 2f3ae73a authored by David Monllaó's avatar David Monllaó Committed by Dan Poltawski
Browse files

Merge branch 'wip-MDL-56899-master' of git://

parents 04fbba05 f31e1e8b
......@@ -1319,7 +1319,9 @@ function format_text($text, $format = FORMAT_MOODLE, $options = null, $courseidd
if ($options['blanktarget']) {
$domdoc = new DOMDocument();
$domdoc->loadHTML('<?xml version="1.0" encoding="UTF-8" ?>' . $text);
foreach ($domdoc->getElementsByTagName('a') as $link) {
if ($link->hasAttribute('target') && strpos($link->getAttribute('target'), '_blank') === false) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment