[wp-trac] [WordPress Trac] #47849: Post excerpts accept spaces
WordPress Trac
noreply at wordpress.org
Thu Aug 8 02:34:30 UTC 2019
#47849: Post excerpts accept spaces
------------------------------------------+-----------------------------
Reporter: adeltahri | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Posts, Post Types | Version: 5.2.2
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* keywords: reporter-feedback => needs-patch needs-unit-tests
* milestone: Awaiting Review => Future Release
Comment:
Makes sense, thanks for clarifying!
Unlike an empty comment, I don't think we can display an error for an
empty excerpt, as that just means the excerpt will be dynamically
generated by `wp_trim_excerpt()`.
We can, however, use `trim()` before saving it in the database, so that an
excerpt that only contains whitespace is saved as empty.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47849#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list