• Hey There!

    We encountered a problem with the plugin that may be responsible for the inconsistent behavior that some people have been having.

    The plugin page cache generates CSS in a different way from when it is generated live, and the regular expression in the PHP does not match single quotes. This was hard to find, since most browsers turn single-quotes into double quotes in the front-end developer tools, but the PHP analyses the code before that happens.

    This is the line in question:
    $re = ‘/class=”([^”]+)”/’;
    (PageCache.php line 80)

    So, either modifying the regular expression to also match single quotes, or only using double quotes should fix this particular issue.

    Also, any inconsistencies in HTML that the browser can clean up will work when the CSS is not cached, but then fail once it is cached – for example, an extra space:
    <div class =”grid”>

  • The topic ‘Caching doesn’t work for single quotes’ is closed to new replies.