Properly escape CourseKeys and UsageKeys in html templates

[LMS-11372]
[LMS-11370]