Skip to content

Plugin always adds e-content div to post content. Should it? #294

Open
@snarfed

Description

@snarfed

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:

{
  "type": ["h-entry"],
  "properties": {
    "name": ["foo"],
    "category": ["reply"],
    "content": [{"html": "well <em>ok</em> is <a href=\"http://yahoo.com\">that so</a> <a href=\"http://bar.org\">http://bar.org</a>"}],
  }
}

results in this HTML:

<div class="entry-content clear">
<div class='e-content'><a class="u-in-reply-to" href="https://micropub.spec.indieweb.org/"></a></p>
<div class="e-content">
well <em>ok</em> is <a href="http://yahoo.com">that so</a> <a href="http://bar.org">http://bar.org</a>
</div>
</div>
<div class="syndication-links"></div>
</div><!-- .entry-content -->

I'm guessing because of this code?

if ( ! empty( $post_content ) ) {
$lines[] = '<div class="e-content">';
$lines[] = $post_content;
$lines[] = '</div>';
}

e-content is probably up to the theme, right? Should the plugin be injecting this extra e-content div?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions