def sanitize_doc(comment):
    """Substitute HTML breaks for new lines in comment text.

    :param comment: The comment text
    :returns: Sanitized comment text

    """
    if isinstance(comment, list):
        return sanitize_doc("\n".join(filter(None, comment)))
    else:
        return comment.replace("\n", "<br/>") if comment else comment