I would have created the new list given the `max_text_length` parameter and then return `jinja2.Markup(', '.join(the_new_list))` whatever the case to avoid duplicating the `jinja2.Markup` part.