Readability strips out too much HTML, breaking anchor links
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.5k
- Forks
- 732
- PR merge metrics
- No merged PRs in 30d
Description
The URL in question: https://practicaltypography.com/are-two-spaces-better-than-one.html
The source HTML looks like this:
<p>
...
<a href="#update-august-2022">
2022 update
::after
</a>
...
</p>
...
<div class="subhead" id="update-august-2022">
<a href="#update-august-2022">Update, August 2022</a>
</div>
After Readability it looks like this:
<p>
...
<a class="no-href" href="#update-august-2022">
2022 update
</a>
...
</p>
...
i.e. the anchor link destination has been stripped out and so the href no longer works.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided practicaltypography.com URL through Readability and comparing the source and processed HTML around the anchor and its target. Trace the handling of same-page links, then verify that the processed anchor retains a working href to the existing update-august-2022 destination.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100