mirror of
https://github.com/moodle/moodle.git
synced 2025-03-19 15:10:05 +01:00
Merge branch 'wip-MDL-56899-master' of git://github.com/marinaglancy/moodle
This commit is contained in:
commit
2f3ae73ab0
@ -1319,7 +1319,9 @@ function format_text($text, $format = FORMAT_MOODLE, $options = null, $courseidd
|
||||
|
||||
if ($options['blanktarget']) {
|
||||
$domdoc = new DOMDocument();
|
||||
libxml_use_internal_errors(true);
|
||||
$domdoc->loadHTML('<?xml version="1.0" encoding="UTF-8" ?>' . $text);
|
||||
libxml_clear_errors();
|
||||
foreach ($domdoc->getElementsByTagName('a') as $link) {
|
||||
if ($link->hasAttribute('target') && strpos($link->getAttribute('target'), '_blank') === false) {
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user