• Resolved Texiwill

    (@texiwill)


    Hello,

    I noticed that speed booster pack adds defer= with the wrong quotes, which causes firewall issues on some sites.

    <script src="https://site.com/wp-content/plugins/fast-velocity-minify/cache/header-883a1e27-1475597599.min.js' defer='defer" type="text/javascript"></script>

    Note the ‘ quote when it should a be ” at the end of the .js string.

    This is a problem!

    Simply changing line 432 in core.php from:

    return "$url\" defer=\"defer";

    to

    return "$url\" defer=\"defer";

    fixed the problem.

    Thank you,
    — Edward Haletky

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Edwuard,

    I’ve just tested the source code that correctly outputs defer='defer'

    Thanks anyway!

    Thread Starter Texiwill

    (@texiwill)

    Hello,

    You are correct it outputs defer=’defer’ however it incorrectly handles the quotes… If I use single quote it works fine, but I often use double quotes and you outputting single quote messes up HTML. It outputs like this:

    src="url' defer='defer'"

    That ends up being parsed incorrectly. The code needs to handle double and single quotes appropriately.

    I incorrectly stated what should be done… but for me the fix was to change line 432 to use double quotes not single quotes… However, the real solution is to detecting the quote mechanism and use it for the defer.

    Best regards,
    Edward L. Haletky

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Defer Javascript adds quotes wrong’ is closed to new replies.