Issue with HTML blocks inside the Post Editor

I’m unable to reproduce this on a fresh WordPress 6.1.1 site with the default theme and NO PLUGIN installed. Please see the screen recording below.

It seems it’s some issue on your site.

(If I didn’t take the correct steps to reproduce the error, please let me know and I’d be happy to do it again.)

UPDATE:

Watching the video, I realized my screen recording didn’t show the browser’s toolbar and address bar, so you don’t see me refreshing the page. But you’ll have to trust me on this: I refreshed the editor page several times, even left the screen all together to the ALL POSTs screen and came back.

No, you used the wrong code, it has async=”” already.

The right one is where it’s just async, WordPress changes it to async =””

Use this or something similar to it,

<script async src="https://somelink.do"></script>

Then copy the block using the copy block option under the “three dots”, and then paste it.

You’ll see async will be changed to async=””

Alternatively, not doing the copy-paste block thing, just have the code on the post, save it, and then refresh/revisit the post, you’ll see the same – async will change to async=””

Note that I was able to reproduce this without any plugins working on the site.

Sorry I grossed over that, because:

<script async src="https://somelink.do"></script>

and

<script async="" src="https://somelink.do"></script>

… are equivalent, so I didn’t really understand this was the “problem” you were reporting.

This is NOT a problem. If something is not working on your site, the problem is elsewhere.

According to the HTML technical standard:

Empty attribute syntax

Certain attributes may be specified by providing just the attribute name, with no value.

In the following example, the disabled attribute is given with the empty attribute syntax:

<input disabled>

Note that empty attribute syntax is exactly equivalent to specifying the empty string as the value for the attribute, as in the following example.

<input disabled="">

  • This reply was modified 22 minutes ago by George Appiah. Reason: Added W3C reference

Why did no one tell me async is the same as async=””

;-; So sorry for the trouble and thank you so much for mega humble support. I thought it’s not equivalent, and that’s why the ads weren’t loading, but it was related to caching.

Thank you so much George.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer