Prevent parsing in pre, html, and script tags.

This commit is contained in:
Daniel Kraus
2014-06-02 18:26:39 +02:00
parent 3d37b2d8ba
commit 821d6d6b34

View File

@ -128,6 +128,8 @@
$templatesDelimiter . // templates (if requested) $templatesDelimiter . // templates (if requested)
'^ .+?\n|\n .+?\n|\n .+?$|^ .+?$|' . // preformatted text '^ .+?\n|\n .+?\n|\n .+?$|^ .+?$|' . // preformatted text
'<nowiki>.*?<.nowiki>|<code>.*?<\/code>|' . // nowiki/code '<nowiki>.*?<.nowiki>|<code>.*?<\/code>|' . // nowiki/code
'<pre>.*?<\/pre>|<html>.*?<\/html>|' . // pre/html
'<script>.*?<\/script>|' . // script
'\[' . $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';