def METHOD_NAME(self):
    """
    Tests that the dashboard renders the escaped recent enrollment messages appropriately.
    """
    self._configure_message_timeout(600)
    self.client.login(username=self.student.username, password=self.PASSWORD)
    # New Course
    course_location = locator.CourseLocator('TestOrg', 'TestCourse', 'TestRun')
    xss_content = "<script>alert('XSS')</script>"
    course = CourseFactory.create(
        org=course_location.org,
        number=course_location.course,
        run=course_location.run,
        display_name=xss_content
    )
    CourseEnrollment.enroll(self.student, course.id)
    response = self.client.get(reverse("dashboard"))
    self.assertContains(response, "Thank you for enrolling in")
    # Check if response is escaped
    self.assert_no_xss(response, xss_content)