Plugin Directory

Changeset 2060793


Ignore:
Timestamp:
04/01/2019 07:01:33 AM (7 years ago)
Author:
dozty
Message:

Minor update on Optional Settings compatibility

Location:
dozwpsecure
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • dozwpsecure/tags/1.2/DozWPSecure.php

    r2060729 r2060793  
    1111Requires at least: 4.4
    1212Tested up to: 5.1.1
    13 Stable tag: 1.0
     13Stable tag: 1.2
    1414Version: 1.2
    1515License: GPLv2 or later
     
    346346    //DozWPSecure_Basic_chk_RemoveHTMLCommentTags
    347347    if(isset($DozWPSecure_options['DozWPSecure_Basic_chk_RemoveHTMLCommentTags'])){
    348         $text = preg_replace('/(<!--(.*?)-->)/i','',$text);
     348        $text = preg_replace('/(<!--[\w\d\s<\/>\"\=\-\#]+-->)|(<!--(.*?)-->)/i','',$text);
    349349    }
    350350    //DozWPSecure_Basic_chk_TrimHTMLContent
    351351    if(isset($DozWPSecure_options['DozWPSecure_Basic_chk_TrimHTMLContent'])){
    352         $text = preg_replace('/\s{2,}/', ' ', $text);
     352        $text = preg_replace('/\s{2,}/', "\n", $text);
    353353        $text = preg_replace('/> </', '><', $text);
    354         $text = preg_replace("/[\t]+/", '', $text);
     354        $text = preg_replace('/[\t]+/', '', $text);
    355355        $text = preg_replace('/[\r\n]+/', "\n", $text);
    356356    }
  • dozwpsecure/trunk/DozWPSecure.php

    r2060729 r2060793  
    1111Requires at least: 4.4
    1212Tested up to: 5.1.1
    13 Stable tag: 1.0
     13Stable tag: 1.2
    1414Version: 1.2
    1515License: GPLv2 or later
     
    346346    //DozWPSecure_Basic_chk_RemoveHTMLCommentTags
    347347    if(isset($DozWPSecure_options['DozWPSecure_Basic_chk_RemoveHTMLCommentTags'])){
    348         $text = preg_replace('/(<!--(.*?)-->)/i','',$text);
     348        $text = preg_replace('/(<!--[\w\d\s<\/>\"\=\-\#]+-->)|(<!--(.*?)-->)/i','',$text);
    349349    }
    350350    //DozWPSecure_Basic_chk_TrimHTMLContent
    351351    if(isset($DozWPSecure_options['DozWPSecure_Basic_chk_TrimHTMLContent'])){
    352         $text = preg_replace('/\s{2,}/', ' ', $text);
     352        $text = preg_replace('/\s{2,}/', "\n", $text);
    353353        $text = preg_replace('/> </', '><', $text);
    354         $text = preg_replace("/[\t]+/", '', $text);
     354        $text = preg_replace('/[\t]+/', '', $text);
    355355        $text = preg_replace('/[\r\n]+/', "\n", $text);
    356356    }
Note: See TracChangeset for help on using the changeset viewer.