#58805 closed defect (bug) (fixed)
Trim footnote anchors from excerpts
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch has-unit-tests gutenberg-merge |
Focuses: | Cc: |
Description
When the post content has one or more footnotes, the excerpt block picks up the link text, the visually hidden star, as part of the content.
See Gutenberg issue for a description of the problem. https://github.com/WordPress/gutenberg/issues/52035
This has been rectified in Gutenberg since: https://github.com/WordPress/gutenberg/pull/52518 and needs to be ported to Core.
Change History (9)
This ticket was mentioned in PR #4845 on WordPress/wordpress-develop by @ramonopoly.
19 months ago
#1
@ramonopoly commented on PR #4845:
19 months ago
#2
cc @mcsf
Not sure if this is what you had in mind. Feel free to trash this one if so 😄
Also not sure if where I've put things is correct, e.g., different file? Different place in the excerpt formatting chain 🤷🏻
I probably need more tests too. Testing this PR surface a couple of bugs, e.g., https://github.com/WordPress/gutenberg/issues/52628
#3
@
19 months ago
- Keywords changes-requested added
Thanks @ramonopoly for ticket and PR. Left some feedback on PR.
#4
@
19 months ago
Thanks @ramonopoly for ticket and PR. Left some feedback on PR.
Thanks! Appreciate it.
#5
@
19 months ago
@ramonopoly: many thanks for the ticket and patch! It looks good and works well in my testing.
@mukesh27: once you're happy with the changes, feel free to approve this one.
19 months ago
#6
Not sure if this is what you had in mind. Feel free to trash this one if so 😄
I've responded in Trac already, but yeah, this is great! :)
#7
@
19 months ago
- Keywords changes-requested removed
The regexp in the PR seems a little bit too specific, but should work. All feedback seems to have been addressed, +1 to commit from me too.
Backports changes from https://github.com/WordPress/gutenberg/pull/52518
Adding a function to
wp_trim_excerpt
that removes footnotes from content.Adds tests
Trac ticket: https://core.trac.wordpress.org/ticket/58805