DC codes in HTML get mangled after switching to rich editor

On the latest theme version, I notice that when I switch to the rich editor on a text element that some of the HTML gets mangled as soon as I activate the editor, before I even make any changes to it.

I have links in the text setup using dynamic content for the permalink as follows:

What starts as:
href="{{ post.permalink({“post”:“871”}) }}">

Becomes:
href="{{ post.permalink({" post="" :="" 871="">

I’ve made a test page and included the details in the private note