Support » Plugin: Code Snippets » Safari: form+submit causes code snippet to not save except when reloaded

  • Steps to reproduce using Safari web browser v13.0.5 latest:

    1) Make an admin-only code snippet containing this PHP code:

    
    add_action( 'admin_notices', function() {
    	echo '<form method="POST" action=""><input type="submit" value="TEST"></form>';
    } );
    

    2) Save the code snippet.

    3) Optionally add something new to the code snippet.

    4) Click the save button the second time.

    Observed Result: You either get a blank screen (about:blank) or a browser error “This is a non-secure form.” followed by a blank screen. Does not reproduce using the latest Google Chrome browser.

    Expected result: code snippet to save.

    Workaround: After saving each time, refresh the window, then you can save again one time. Or, if you get the error, click BACK, copy the code to the clipboard, refresh the window, paste the code, then save.

    Note: As a browser issue I don’t know if this really can be fixed, just putting it out there as I’ve come across it a few times already. Maybe somebody knows of a setting that can circumvent it?

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

    (@bungeshea)

    Hmm, this is interesting.

    Unfortunately, I don’t have a copy of Safari I can test this on, and I’m not sure what is causing this. I’d think that the extra form added near the top of the page would be completely separate from the snippet form.

    Thread Starter Sean Conklin

    (@seanconklin)

    Just reproduced in the latest Safari version 13.1.2 (13609.3.5.1.5).

    https://en.wikipedia.org/wiki/Safari_version_history

    I am not reproducing on:
    – Latest Google Chrome
    – Latest FireFox
    – Latest Microsoft Edge

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Safari: form+submit causes code snippet to not save except when reloaded’ is closed to new replies.