WordPress.org

Make WordPress Core

Opened 12 months ago

Last modified 6 weeks ago

#41208 assigned defect (bug)

Dashboard News & Events widget does not properly handle entities (e.g. en/em dash)

Reported by: nickciske Owned by:
Milestone: Future Release Priority: low
Severity: normal Version: 4.8
Component: Administration Keywords: needs-patch
Focuses: Cc:

Description

"WordCamp Minneapolis – St. Paul, Minnesota, USA" is displayed as "WordCamp Minneapolis – St. Paul, Minnesota, USA"

Attachments (4)

Screen Shot 2017-06-29 at 2.02.53 PM.png (45.1 KB) - added by nickciske 12 months ago.
Screenshot of issue
WP News and Announcements OK at-sign.PNG (38.9 KB) - added by kpegoraro 11 months ago.
Screenshot of at sign in WP News and Events
WP News and Announcements OK em-dash.PNG (68.3 KB) - added by kpegoraro 11 months ago.
WP News and Events em-dash example
WP News and Announcements OK en-dash.PNG (57.3 KB) - added by kpegoraro 11 months ago.
WP News and Announcements OK en-dash example screenshot

Download all attachments as: .zip

Change History (8)

@nickciske
12 months ago

Screenshot of issue

#1 @kpegoraro
11 months ago

On Chrome on Windows, I see the same result for the Minneapolis event in the first screenshot from nickciske, but I do see em- and en-dashes and at-signs properly for other events (screenshots attached).

@kpegoraro
11 months ago

Screenshot of at sign in WP News and Events

@kpegoraro
11 months ago

WP News and Events em-dash example

@kpegoraro
11 months ago

WP News and Announcements OK en-dash example screenshot

#2 @iandunn
11 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Owner set to iandunn
  • Priority changed from normal to low
  • Status changed from new to accepted

I'm seeing this too. I haven't had time to really dig into it, but the – entity is returned by the w.org API, which seems appropriate at first glance.

My first guess would be that {{ is preventing the entity from being rendered. Running the data through htmlspecialchars_decode() before it gets returned from get_events() might be a good fix. I think that'd be safe, since it'd still be passed through {{, but we'd need to verify that.

#3 @shedonist
7 months ago

I think this issue may have been resolved by Meetup itself. I tried editing one of my future meetups (https://www.meetup.com/WordpressDevSeacoast/events/243889267/ - on 1/11/18) to contain an endash or an emdash and it shows properly both in Meetup and also when I looked at it in the dashboard (search for "Nottingham") and the "Users — TBD" meetup shows fine.

Steps: What I did was paste the entity directly into the meetup title. Then I waited for the widget to refresh itself (I deleted my local transients, but it seems like Meetup or something up the chain was caching the titles for a bit). I am able to find my meetup at the moment by searching for "Nottingham" (this narrows the search so I can see further ahead to the Jan meetup). Once the updated "Users — TBD" title appeared in the widget, it was displaying correctly.

#4 @iandunn
6 weeks ago

  • Owner iandunn deleted
  • Status changed from accepted to assigned
Note: See TracTickets for help on using tickets.