WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
392 stars 630 forks source link

It's possible to create slugs with URL-encoded spaces #985

Closed ragesoss closed 7 years ago

ragesoss commented 8 years ago

See for example: https://dashboard.wikiedu.org/courses/Hunter_College_CUNY/AFPRL_29026%C2%A0Intro_to_Hip_Hop_Culture_and_History_%28Fall_2016%29

That breaks the return links from Wikipedia, and disrupts the url.

The slug function on the front-end should handle this situation.

ragesoss commented 7 years ago

Here's the method that generates the slugs from user input: https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/app/assets/javascripts/utils/course_utils.js#L4