MDL-61403 filter: Fix for the nolink tag ignored

Fix for the nolink tag ignored if there are some other attributes defined in the same span
This commit is contained in:
Sergio Rabellino 2018-06-28 09:23:51 +02:00
parent 8793e120b9
commit af344834e1

View file

@ -1240,7 +1240,7 @@ function filter_phrases($text, &$link_array, $ignoretagsopen=NULL, $ignoretagscl
// A list of open/close tags that we should not replace within // A list of open/close tags that we should not replace within
// Extended to include <script>, <textarea>, <select> and <a> tags // Extended to include <script>, <textarea>, <select> and <a> tags
// Regular expression allows tags with or without attributes // Regular expression allows tags with or without attributes
$filterignoretagsopen = array('<head>' , '<nolink>' , '<span class="nolink">', $filterignoretagsopen = array('<head>' , '<nolink>' , '<span(\s[^>]*?)?class="nolink"(\s[^>]*?)?>',
'<script(\s[^>]*?)?>', '<textarea(\s[^>]*?)?>', '<script(\s[^>]*?)?>', '<textarea(\s[^>]*?)?>',
'<select(\s[^>]*?)?>', '<a(\s[^>]*?)?>'); '<select(\s[^>]*?)?>', '<a(\s[^>]*?)?>');
$filterignoretagsclose = array('</head>', '</nolink>', '</span>', $filterignoretagsclose = array('</head>', '</nolink>', '</span>',