Opened 4 years ago
Last modified 3 years ago
#41208 assigned defect (bug)
Dashboard News & Events widget does not properly handle entities (e.g. en/em dash)
Reported by: |
|
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)
Change History (8)
#1
@
4 years 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).
#2
@
4 years 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
@
3 years 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.
Screenshot of issue