mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 09:49:31 +02:00
Prevent linking inside attributes etc.
Includes prevention of linking in class and style attributes of WikiTables.
This commit is contained in:
@ -130,6 +130,9 @@
|
|||||||
'<nowiki>.*?<.nowiki>|<code>.*?<\/code>|' . // nowiki/code
|
'<nowiki>.*?<.nowiki>|<code>.*?<\/code>|' . // nowiki/code
|
||||||
'<pre>.*?<\/pre>|<html>.*?<\/html>|' . // pre/html
|
'<pre>.*?<\/pre>|<html>.*?<\/html>|' . // pre/html
|
||||||
'<script>.*?<\/script>|' . // script
|
'<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
|
'\[' . $urlPattern . '\s.+?\]|'. $urlPattern . '(?=\s|$)|' . // urls
|
||||||
'(?<=\b)\S+\@(?:\S+\.)+\S+(?=\b)' . // email addresses
|
'(?<=\b)\S+\@(?:\S+\.)+\S+(?=\b)' . // email addresses
|
||||||
')/i';
|
')/i';
|
||||||
|
Reference in New Issue
Block a user