Opened 9 months ago
Last modified 9 months ago
#61249 new defect (bug)
The character count in the post_excerpt is fine instead of counting words.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.5.3 |
Component: | Posts, Post Types | Keywords: | dev-feedback needs-testing |
Focuses: | administration | Cc: |
Description
It is known that multiple words written without spaces are counted as a single word. This could lead to situations where an excerpt includes a string of characters (which should be separate words) that significantly exceeds the intended limit but is still accepted because it is counted as only one word due to the lack of spaces.
The ultimate goal of imposing a limit on the excerpt is to ensure that it remains concise and to the point. By not accurately counting characters, and thus potentially allowing excerpts to be longer than intended, the system fails to achieve its true purpose. This could affect how excerpts are displayed or how much space they take up on a website or in an admin interface.
Including a character count would provide a more precise and predictable way to limit the length of excerpts. It would ensure consistency regardless of how words are spaced and would give administrators a clear indication of how much text they can include.
@sarkarripon you may be interested in the wp_trim_excerpt filter which provides you the ability to further limit the generated excerpt, such as if it's longer than you want.