forked from ruangrupa/konfluks
feed: escape quotation marks
This commit is contained in:
parent
6339724510
commit
f69c092548
@ -5,6 +5,7 @@ from hashlib import md5
|
||||
from ast import literal_eval as make_tuple
|
||||
from pathlib import Path
|
||||
from urllib.parse import urlparse
|
||||
from re import sub
|
||||
|
||||
import arrow
|
||||
import feedparser
|
||||
@ -57,12 +58,12 @@ def create_frontmatter(entry):
|
||||
published = arrow.get(published)
|
||||
|
||||
if "author" in entry:
|
||||
author = entry.author
|
||||
author = sub('"', '\\"', entry.author)
|
||||
else:
|
||||
author = ""
|
||||
|
||||
if "title" in entry:
|
||||
title = entry.title
|
||||
title = sub('"', '\\"', entry.title)
|
||||
else:
|
||||
title = ""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user