Skip to content

Mentions in posts use incorrect markup #454

Description

@jeherve

I use both the ActivityPub plugin and the Friends plugin on my site, and recently published a post where I mentioned one of the people I follow. In my post content, I had the following text:

Here is a mention of @handle@domain.tld

In the ActivityPub representation of the post, when the Friends plugin is active the markup is as follows:

Here is a mention of <a rel="mention" class="u-url mention" href="https://domain.tld/@handle">@<span>handle</span></a>@domain.tld

If I deactivate the Friends plugin, the markup is as follows, as expected:

Here is a mention of <a rel="mention" class="u-url mention" href="https://domain.tld/@handle">@<span>handle</span></a>

For reference, here is where this auto-link happens in ActivityPub:
https://github.com/Automattic/wordpress-activitypub/blob/565d77eb67cc69fc60f0e54fd54ed2c4c9b05cc2/includes/class-mention.php#L67C25-L67C43

And here is Friends' function:

public function replace_with_links( array $result ) {

Maybe the function should not be run when the ActivityPub plugin is active?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions