forked from ruangrupa/konfluks
hashtag: escape quotation marks for display_name
This commit is contained in:
parent
ab1f8d9d7a
commit
6339724510
@ -1,6 +1,7 @@
|
||||
import os
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
from re import sub
|
||||
|
||||
import jinja2
|
||||
import requests
|
||||
@ -68,7 +69,9 @@ def create_post(post_directory, post_metadata):
|
||||
|
||||
template_dir = os.path.join(Path(__file__).parent.resolve(), "templates")
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir))
|
||||
|
||||
name = post_metadata['account']['display_name']
|
||||
name = sub('"', '\\"', name)
|
||||
post_metadata['account']['display_name'] = name
|
||||
env.filters["localize_media_url"] = localize_media_url
|
||||
env.filters["filter_mastodon_urls"] = filter_mastodon_urls
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user