substitute every '%s' in string '%s<li>%s%s</li>' with indent, with result of the function escaper called with an argument:
output . append ( '%s<li>%s%s</li>' % ( indent , escaper ( force_text ( title ) ) , sublist ) )