beatonma / django-wm

Automatic Webmention functionality for Django models
https://beatonma.org/webmentions_tester/
GNU General Public License v3.0
12 stars 2 forks source link

Don't make links to same-page #anchors into targets #32

Closed philgyford closed 1 year ago

philgyford commented 2 years ago

If I save a MentionableMixin object that contains links to anchors elsewhere on the page, those are treated as targets to which outgoing webmentions should be sent.

e.g. On this page there is this HTML:

<p id="s5"><a class="section-anchor" href="#s5" title="Link to this section">&sect;</a> ...

and I end up with Outgoing Webmention Statuses that include:

Screenshot 2022-03-30 at 15 05 42

etc. I guess filter out any links that are # fragment links to the page itself?