Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Zoltan Baffy

    (@macika)

    Or any solution to completely disable quotation mark removal in HTML?

    • This reply was modified 3 years, 10 months ago by Zoltan Baffy.
    Thread Starter Zoltan Baffy

    (@macika)

    Problem solved!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @macika

    Thank you for the information.
    Please share any helpful info for other users if convenient.
    Thanks!

    Thread Starter Zoltan Baffy

    (@macika)

    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 3 years, 10 months ago by Zoltan Baffy.
    • This reply was modified 3 years, 10 months ago by Zoltan Baffy.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Minify removes double quotes in inlined JS code’ is closed to new replies.