Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem:
search_excerpt() uses "..." instead of "…" (individual dots instead of Unicode ellipsis character).
Solution:
Use "…" in search_excerpt() instead.
To repliccate:
- Add a blog post with a lot of content
- Run cron to see that the page is indexed
- Search for the page
- Look for the ... prefixing the exerpted contect
Comment | File | Size | Author |
---|---|---|---|
#2 | Post-patch-ellipsis.png | 98.9 KB | mgifford |
#2 | Pre-patch-ellipsis.png | 127.79 KB | mgifford |
#1 | 2279623-1.patch | 1.13 KB | thedavidmeister |
Comments
Comment #1
thedavidmeister CreditAttribution: thedavidmeister commentedComment #2
mgiffordNice patch. Here's the before image:
And after the patch:
Basically this won't make a big difference for most, but for folks who care about typography this is an important improvement.
Comment #3
thedavidmeister CreditAttribution: thedavidmeister commentedRTBC then?
Comment #4
mgiffordYes. I think so.
Comment #5
alexpottWhy not
…
instead of the unicode character?Comment #6
alexpottTo answer my own question #44987: [meta] Use the UTF-8 ellipsis character instead of "..." in the user interface which I would have seen if I looked in the related issues.
Comment #7
alexpottCommitted 686e1da and pushed to 8.x. Thanks!