SHA256
Fixes, I hope.
This commit is contained in:
@@ -12,6 +12,7 @@ from werkzeug.security import generate_password_hash, check_password_hash
|
||||
import markdown
|
||||
import logging
|
||||
import re
|
||||
from urllib.parse import quote
|
||||
from email import message_from_string
|
||||
from email.mime.text import MIMEText
|
||||
from whoosh.index import create_in, open_dir
|
||||
@@ -359,7 +360,9 @@ def rewrite_eml_file_links(md_content, filepath):
|
||||
|
||||
# Ensure forward slashes for URL
|
||||
resolved_path = resolved_path.replace(os.sep, '/')
|
||||
file_url = f"/file/{resolved_path}"
|
||||
# URL-encode the path, preserving forward slashes
|
||||
encoded_path = quote(resolved_path, safe='/')
|
||||
file_url = f"/file/{encoded_path}"
|
||||
|
||||
return f"[{link_text}]({file_url})"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user