Permalink
Browse files

by default don't do revslider-fix-dance + improvement in space-adding…

… regex
  • Loading branch information...
1 parent 05f0980 commit 0f6ac683c35bc82d1ac2d496ae3b66bb53e49f88 @futtta committed Aug 6, 2017
Showing with 5 additions and 5 deletions.
  1. +5 −5 classes/autoptimizeHTML.php
@@ -66,11 +66,11 @@ public function minify() {
}
}
- // revslider data attribs somehow suffer from HTML optimization, this fixes that
- if ( class_exists('RevSlider') || apply_filters('autoptimize_filter_html_dataattrib_cleanup', false) ) {
- $this->content = preg_replace('#\n(data-.*$)\n#Um',' $1 ', $this->content);
- $this->content = preg_replace('#(=\"[^"]*\")(\w)#','$1 $2', $this->content);
- }
+ // revslider data attribs somehow suffer from HTML optimization, this fixes that
+ if ( class_exists('RevSlider') && apply_filters('autoptimize_filter_html_dataattrib_cleanup', false) ) {
+ $this->content = preg_replace('#\n(data-.*$)\n#Um',' $1 ', $this->content);
+ $this->content = preg_replace('#<[^>]*(=\"[^"\'<>\s]*\")(\w)#','$1 $2', $this->content);
+ }
return true;
}

1 comment on commit 0f6ac68

Owner

futtta commented on 0f6ac68 Aug 6, 2017

Please sign in to comment.