wordpress-webmention: Are source URLs getting incorrectly URL-decoded?

Hi @dshanske @pfefferle! I’m seeing an odd issue with source URLs with URL-encoded # characters, eg https://fed.brid.gy/render?id=https%3A%2F%2Findieweb.social%2Fusers%2Fsnarfed%23likes%2F709275 . That page has a u-like-of with a full p-author h-card, with name and photo, but when WordPress receives it as a webmention source, Semantic-Linkbacks doesn’t find that author at all.

However, if I double-URL-encode the # character, ie https://fed.brid.gy/render?id=https%3A%2F%2Findieweb.social%2Fusers%2Fsnarfed%2523likes%2F709275 , the webmention works fine and correctly shows the author name and image.

I know URLs with #s are awkward, even when URL-encoded, but the first source URL is working ok with other wm receivers, eg https://www.jvt.me/week-notes/2023/09/ (scroll down and expand Interactions with this post), so I suspect this is a bug in this plugin or Semantic-Linkbacks?

Thanks in advance!

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

It is at least no double encoding or something similar.

esc_url, esc_url_raw and sanitize_url seems to remove the ^^ special chars. That is not really good, because these are highly recommended when dealing with URLs.

OK, that might be possible because of the interaction of both (Webmention & SL) plugins, I will re-check the latest version of the Webmention plugin.