Modify regex and handle Javascript links