[wp-trac] [WordPress Trac] #60295: esc_html() function returns an empty string when the last character of the input string variable is ASCII 145 or 146

WordPress Trac noreply at wordpress.org
Fri Jan 19 17:26:28 UTC 2024


#60295: esc_html() function returns an empty string when the last character of the
input string variable is ASCII 145 or 146
-------------------------------+------------------------------
 Reporter:  jani20             |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Formatting         |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by jani20):

 Thank you @TobiasBg, this is it. The characters are in post content pasted
 from some non-WP source (Hubspot probably). The issue was noticed when
 get_the_excerpt() cut the content so U+0092 was the last character to be
 shown in the excerpt, after esc_html() the excerpt disappears.

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


More information about the wp-trac mailing list