Prevent linking inside attributes etc.

Includes prevention of linking in class and style attributes of WikiTables.
This commit is contained in:
Daniel Kraus
2014-06-02 19:58:01 +02:00
parent cf792072dd
commit 256f905c69

View File

@ -130,6 +130,9 @@
'<nowiki>.*?<.nowiki>|<code>.*?<\/code>|' . // nowiki/code
'<pre>.*?<\/pre>|<html>.*?<\/html>|' . // pre/html
'<script>.*?<\/script>|' . // script
'<div.+?>|<\/div>|' . // attributes of div elements
'<span.+?>|<\/span>|' . // attributes of span elements
'style=".+?"|class=".+?"|' . // styles and classes (e.g. of wikitables)
'\[' . $urlPattern . '\s.+?\]|'. $urlPattern . '(?=\s|$)|' . // urls
'(?<=\b)\S+\@(?:\S+\.)+\S+(?=\b)' . // email addresses
')/i';