by Ken Task.
Go to the course and see how the Section Names are done.
In looking at the debug trace - 1st item and the line it references:
$section_included->get_ui()->set_label(get_section_name($course, $section));
As @Yusuf has discovered, the error could be caused by errant HTML in Section Name. Tags in HTML if not done properly with 'opening tags' and then 'closing tags' could be interpreted as 'redirects' (those are < or >) or as 'escapes' (the '\' character).
'spirit of sharing', Ken