mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-08-05 16:48:53 +00:00
Fix remaining slashes not being converted into text and made % be converted
This commit is contained in:
parent
f1ab1c2b69
commit
1f22cda9be
1 changed files with 2 additions and 0 deletions
|
@ -115,7 +115,9 @@ def handle_url(u: re.Match[str]) -> str:
|
|||
url = url.replace("?", " question-mark ")
|
||||
url = url.replace("=", " equals ")
|
||||
url = url.replace("&", " ampersand ")
|
||||
url = url.replace("%", " percent ")
|
||||
url = url.replace(":", " colon ") # Handle any remaining colons
|
||||
url = url.replace("/", " slash ") # Handle any remaining slashes
|
||||
|
||||
# Clean up extra spaces
|
||||
return re.sub(r'\s+', ' ', url).strip()
|
||||
|
|
Loading…
Add table
Reference in a new issue