def to_html(value, main_tag='p'):
    """
    If value is a string and not starting with an HTML tag:
     + Convert "
" to <br/>
     + Place all content inside <main_tag> HTML tag

    :param value: string to process
    :param main_tag: HTML tag to apply around all content
    :return: processed value if is str, else: the original value unchanged
    """
    if isinstance(value, str):
        value = value.strip()
        start_tag = ''
        end_tag = ''
        if len(value) > 0 and value[0] != '<':
            if main_tag and main_tag != '':
                start_tag = '<%s>' % main_tag
                end_tag = '</%s>' % main_tag
            value = '%s%s%s' % (start_tag, value.replace('\r', '').replace(
                '\n', '<br/>'), end_tag)
    return value
