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?
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.tldIn 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.tldIf 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:
friends/feed-parsers/class-feed-parser-activitypub.php
Line 1785 in 2494bc9
Maybe the function should not be run when the ActivityPub plugin is active?