Skip to content
GitLab
Explore
Sign in
Commits on Source (1)
MDL-61403 filter: Fix for the nolink tag ignored
· adeff605
Sergio Rabellino
authored
Jun 28, 2018
Fix for the nolink tag ignored if there are some other attributes defined in the same span
adeff605
Hide whitespace changes
Inline
Side-by-side
lib/filterlib.php
View file @
adeff605
...
...
@@ -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
// Extended to include <script>, <textarea>, <select> and <a> tags
// 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[^>]*?)?>'
,
'<select(\s[^>]*?)?>'
,
'<a(\s[^>]*?)?>'
);
$filterignoretagsclose
=
array
(
'</head>'
,
'</nolink>'
,
'</span>'
,
...
...