_dashboard_course_listing.html
25 KB
-
Move unenroll messages into separate data attributes. · 3320ecf4
Having the messeges embedded into onclick attributes was fragile because it could break if the translated string contained special characters such as single quotes. Rather than trying to escape the special characters inside the onclick handler, move the translatable strings into separate h-escaped data attributes and interpolate the values in the (already existing) jQuery click handler rather than in the inline onclick handler. This makes the javascript code more consistent as well as fixes the problem where the popup would break if translation included single quotes.
Matjaz Gregoric committed