Ok. I got it. For future reference, if anyone is trying to pass html through embed variables, there’s a couple of extra steps you need to take. EE parses the variable values first, so something like
{embed foo="{my_html_value}"
is going to fail if you have quotes in the html tags. Regular quotes within your text are ok, as EE will replace them with HTML entities, but it skips the ones inside of tags like for <div class=“foo”>
The way I solved it was through a plugin. I used low replace to do my searching. You can’t simply search for a double quote however within the plugin tags because of the same issue as above:
EE is going to see that as finding a value for nothing instead of a double quote. Luckily the author of the plugin had the foresight to provide a workaround by using the constant QUOTE. Using this, we can replace our quotes with a token before sending it through to the sub template:
{embed="includes/content"
main_content = "{exp:replace find="QUOTE" replace="__DQ__"}{body}{/exp:replace}"
}
in the subtemplate, we reverse the procedure to get our original quotes back:
{exp:replace find="__DQ__" replace="QUOTE"}{embed:main_content}{/exp:replace}
Kind of clunky, but it seems to work.