UTI and baby safety

Has anyone had a UTI while pregnant and needed antibiotics? They made it sound safe, or at least safer than getting a bladder or kidney infection. Any advice or personal experiences welcome