Open snarfed opened 10 months ago
Just FYI: What I do in my theme (or rather, plugin, but a theme could do the same) is I check if there's a .e-content
in the post content already and only add the class if there isn't. (For some post types, it makes sense to have a, e.g., reply context outside of .e-context
, and since---in my case---both are part of my post content I can't just add an overall e-content
class. Hence the check.)
But I also completely override the Micropub post content in a filter callback, so ... That could work too, at least temporarily. Just remove the div
in a filter.
There's a setting that disables it entirely which my Post Kinds plugin turns on... I have some ideas I might pursue though.
FWIW, I debugged this a bit more just now, and it's not specific to HTML content or JSON input, evidently the plugin always does this when it creates posts. Eg a form-encoded micropub request with content=fooey
results in this content HTML:
<div class="e-content">
fooey
</div>
(I don't actually know what should happen here! Just adding info for now.)
Hi @dshanske et al! I'm seeing an odd behavior with HTML content: two
<div class="e-content">
s, one inside the other. I assume that's not expected? For example, this JSON request:results in this HTML:
I'm guessing because of this code?
https://github.com/indieweb/wordpress-micropub/blob/9bccb0bdc501a1dca9441b713811248e82f43191/includes/class-micropub-render.php#L96-L100
e-content
is probably up to the theme, right? Should the plugin be injecting this extrae-content
div?