[wp-trac] [WordPress Trac] #41208: Dashboard News & Events widget does not properly handle entities (e.g. en/em dash)

WordPress Trac noreply at wordpress.org
Sat Jan 8 23:48:16 UTC 2022


#41208: Dashboard News & Events widget does not properly handle entities (e.g.
en/em dash)
----------------------------+-----------------------------
 Reporter:  nickciske       |       Owner:  (none)
     Type:  defect (bug)    |      Status:  assigned
 Priority:  low             |   Milestone:  6.0
Component:  Administration  |     Version:  4.8
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  ui, javascript
----------------------------+-----------------------------

Comment (by audrasjb):

 The above PR fixes the issue.

 ## How to test

 **Step 1: simulate the issue**

 Using the PR above, replace this line:
 `$event['title'] = html_entity_decode( $event['title'] );`
 with:
 `$event['title'] = 'test – testing' );`

 See that it displays the raw HTML entity on the dashboard.

 **Step 2: fix the issue**

 Now replace the line with:
 `$event['title'] = html_entity_decode( 'test – testing' );`

 See that it displays: `test – testing`.

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


More information about the wp-trac mailing list