def nl_to_break( text ):
    """
    Text may have newlines, which we want to convert to <br />
    when formatting for HTML display
    """
    text=text.replace("<", "&lt;")  # To avoid HTML insertion
    text=text.replace("\r", "")
    text=text.replace("\n", "<br />")
    return text