Or any solution to completely disable quotation mark removal in HTML?
-
This reply was modified 5 years, 3 months ago by
Zoltan Baffy.
Hello @macika
Thank you for the information.
Please share any helpful info for other users if convenient.
Thanks!
So HTML Minify removes double quotes from inlined scripts (Javascript/JQuery/etc.). This results in an error in certain cases.
To prevent this in the file public_html/wp-content/plugins/w3-total-cache/lib/Minify/Minify/HTML.php in line 354:
Modify this:
$m[3] = preg_replace_callback( '~([a-z0-9\\-])=(?<quote>[\'"])([^"\'\\s=]*)\k<quote>(\\s|>|/>)~i',
array( $this, '_removeAttributeQuotesCallback'), $m[3] );
Into this:
$m[3] = preg_replace_callback( '~([a-z0-9\\-])=(?<quote>[\'])([^\'\\s=]*)\k<quote>(\\s|>|/>)~i',
array( $this, '_removeAttributeQuotesCallback'), $m[3] );
-
This reply was modified 5 years, 3 months ago by
Zoltan Baffy.
-
This reply was modified 5 years, 3 months ago by
Zoltan Baffy.