[wp-trac] [WordPress Trac] #47849: Post excerpts accept spaces

WordPress Trac noreply at wordpress.org
Wed Aug 7 23:28:02 UTC 2019


#47849: Post excerpts accept spaces
-------------------------------+------------------------------
 Reporter:  adeltahri          |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  5.2.2
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by adeltahri):

 Hi @SergeyBiryukov I think if the excerpt contains only spaces it must be
 skipped and not saved in the database.
 if the developer tested $post->post_excerpt if it's empty or not, it will
 return true even with spaces only so we need to use trim() on the test, I
 think it will be good if we validate the input like when we add a new
 comment https://d.pr/i/OrPjEi

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47849#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list