diff options
Diffstat (limited to 'plugins/filter.stylepurifier.php')
| -rwxr-xr-x | plugins/filter.stylepurifier.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/filter.stylepurifier.php b/plugins/filter.stylepurifier.php index be54698..3385c39 100755 --- a/plugins/filter.stylepurifier.php +++ b/plugins/filter.stylepurifier.php @@ -41,10 +41,10 @@ function stylepure_filter( &$pData, &$pFilterHash ) { // strip_tags has doesn't recognize that css within the style tags are not document text. To fix this do something similar to the following: if( !$gBitUser->hasPermission( 'p_liberty_edit_html_style' )) { $pattern = [ - "!<style[^>]*>.*</style>!siU", // <style>...</style> - '![\s\n]*(style|class)\s*=\s*"[^">]*"?!i', // style="..." | class="..." - "![\s\n]*(style|class)\s*=\s*'[^'>]*'?!i", // style='...' | class='...' - "![\s\n]*(style|class)\s*=\s*[^\s>]*!i", // style=... | class=... + "!<style[^>]*>.*</style>!siU", // <style>...</style> + '![\s\n]*(style|class)\s*=\s*"[^">]*"?!i', // style="..." | class="..." + "![\s\n]*(style|class)\s*=\s*'[^'>]*'?!i", // style='...' | class='...' + "![\s\n]*(style|class)\s*=\s*[^\s>]*!i", // style=... | class=... ]; $pData = preg_replace( $pattern, '', $pData ); } |
