Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wikipedia: not all fragments are sections #2316

Closed
dgw opened this issue Jul 13, 2022 · 1 comment · Fixed by #2388
Closed

wikipedia: not all fragments are sections #2316

dgw opened this issue Jul 13, 2022 · 1 comment · Fixed by #2388
Labels
Bug Things to squish; generally used for issues
Milestone

Comments

@dgw
Copy link
Member

dgw commented Jul 13, 2022

Description

MediaWiki uses document fragments for view state in some cases, such as when clicking an image thumbnail to open it in the full viewport. Sopel doesn't like this.

Reproduction steps

  1. Ensure that wikipedia plugin is loaded
  2. Send a link to e.g. https://en.wikipedia.org/wiki/Diffraction_spike#/media/File:Comparison_strut_diffraction_spikes.svg
  3. Note error (Error fetching section "/media/File:Comparison_strut_diffraction_spikes.svg" for page "Diffraction spike".)

Expected behavior

Sopel should fetch either the article synopsis (fallback to ignoring fragment), or info about the media.

The third option is ignoring the link entirely, I suppose.

Relevant logs

No response

Notes

Inspired by #2315, which sort of mitigates a symptom of this (excess highlights) but doesn't treat the cause.

Sopel version

5c4f56e

Installation method

pip install

Python version

3.9.12

Operating system

No response

IRCd

No response

Relevant plugins

wikipedia

@dgw dgw added the Bug Things to squish; generally used for issues label Jul 13, 2022
@dgw dgw added this to the 8.0.0 milestone Jul 13, 2022
@dgw
Copy link
Member Author

dgw commented Dec 29, 2022

Came up again today.

"Easy fix" approach would be ignoring section IDs that begin with /.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Things to squish; generally used for issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant