import re def fix_urls(): file_path = 'src/main/resources/templates/doctor.html' try: with open(file_path, 'r', encoding='utf-8') as f: html = f.read() # Next.js image URL extractor left URL encoded colons html = html.replace('https%3A//', 'https://') html = html.replace('http%3A//', 'http://') html = html.replace('https%3A%2F%2F', 'https://') with open(file_path, 'w', encoding='utf-8') as f: f.write(html) print("Successfully fixed URLs in doctor.html") except Exception as e: print(f"Error: {e}") if __name__ == "__main__": fix_urls()