//

function autoEdLinks(str) { //MAIN FUNCTION describes list of fixes

    str = str.replace(/\]\[/g, "] [");

    //repair bad external links
    str = str.replace(/\[?\[http:\/\/([^\]\n]*?)\]\]?/gi, "[http://$1]");
    //str = str.replace(/\[http:\/\/([^\]]*?)\|([^\]]*?)\]/gi, "[http://$1 $2]");

    return str;
}

//