Closed bwreid closed 2 years ago
I'm not able to reproduce this, as I can't create a course title that includes a /
. It's already being disallowed by the frontend regex.
Was there a production course that ended up with an extra slash in the title (as opposed to the normal slash between school and title)?
There was! I'll forward you the email chain.
I haven't figured out how courses with a slash in the school
field got created in the first place. The validation regex blocks a forward slash in CourseCreator
, Details
, and CourseClonedModal
— all the places where it's possible to set or change the school field.
This got fixed by adjusting the school name: https://dashboard.wikiedu.org/courses/LaGuardia_Community_College_-_St._Petersburg's_Polytechnic_University/ENA-G_101-Composition_(COIL)_(Fall_2019)
However, that slug also does not pass frontend validation, because parentheses are not allowed in the course title field.
The user who did this seems to have bypassed the regex-based validations. Perhaps there are browsers where the regex does not work but the rest of the frontend largely does work?
This hasn't happened again.
What is happening?
If a course title includes a
/
, the slug will also include that/
. It will make it so that visiting the course is impossible.To Reproduce
/
in the title.Expected behavior
A valid URL should be generated. For example, swap
/
with_