If you take the following wikitext:
<div style="background-color: {{#if:bad|#FF0000|#00FF00}};"> <div class="message"> Hello </div> </div>
and convert it to HTML, then back to wikitext again (either by switching from source mode to visual mode and back to source mode in VE, or using node bin/parse.js --wt2wt), then you will get the following wikitext back:
<div style="background-color: {{#if:bad|#FF0000|#00FF00}};"> <div class="message"> Hello </div> </div> "> <div class="message"> Hello </div> </div>
Note " appearing where " should appear in every place after the {{#if:}} parser function (even including the closing quote for the class attribute), and then the same HTML appearing again but with correct quotes.
This is a reduced test case I distilled out of a more complex failure; the key ingredient appears to be the fact that the {{#if:}} parser function inside the style attribute of the first div outputs a #, because if you change it to {{#if:bad|red|green}} it doesn't break.
This was originally reported to me by @Trizek-WMF , who found it while attempting to edit https://www.mediawiki.org/wiki/Topic:Uf0bj00x79a3fkxx in wikitext mode (Flow stores posts as HTML, so a wt2html transformation took place when the post was first saved, and an html2wt transformation takes place when you open it for editing as wikitext).