• Resolved steveraven

    (@steveraven)


    Why when I try to run the WebP upgrade from my media library, do I get an ‘Access Denied’ message saying that ‘Access token has expired, please reload the page’?

    Also, why do I get snippets of php code all over the place when running the ‘Alternative WebP Rewriting’, which is the only way I can get this thing to work?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    The first error usually just means you need to refresh the page. Not always, it could be a permissions issue, but usually it’s just an expired nonce/token.

    On the latter, are you getting PHP code all over, or JS code? That’s a pretty huge difference, but as it would be almost impossible for EWWW to leak PHP code, I suspect you really meant JS (javascript) code.
    That is caused by unescaped html tags within the inline javascript. Because that violates the html specifications, the PHP parser that EWWW uses will attempt to close the JS tags early, and causes it to display the leftover js as html instead. A quick example of what this looks like then…

    If the javascript is inserting a <div>, like this:

    <div>some stuff here</div>

    That’s exactly how it should look in raw HTML, but when you use that in an inline javascript block, the closing tag must be escaped, like so:

    <div>some stuff here<\/div>

    If the code in question was written by someone else, you’ll want to report the bug to them and ask them kindly to fix it.
    And for reference, what the HTML5 specification states is that the browser/user-agent should terminate any script element when it finds this character sequence, regardless of whether or not it is actually a closing script tag: </

    Thread Starter steveraven

    (@steveraven)

    Thanks, I cancelled my account.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WebP Images’ is closed to new replies.