diff --git a/posts.py b/posts.py
index 56a89020..ec59bc6d 100644
--- a/posts.py
+++ b/posts.py
@@ -1243,7 +1243,7 @@ def createBlogPost(baseDir: str,
sections = line.strip().split(citationsSeparator)
if len(sections) != 3:
continue
- dateStr = sections[0]
+ # dateStr = sections[0]
title = sections[1]
link = sections[2]
tagJson = {
diff --git a/webinterface.py b/webinterface.py
index 19dbe51d..03a84788 100644
--- a/webinterface.py
+++ b/webinterface.py
@@ -2748,6 +2748,30 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
extraFields += '\n'
extraFields += '\n'
+ citationsStr = ''
+ if endpoint == 'newblog':
+ citationsFilename = \
+ baseDir + '/accounts/' + \
+ nickname + '@' + domain + '/.citations.txt'
+ if os.path.isfile(citationsFilename):
+ citationsStr = '
\n'
+ citationsStr += '
\n'
+ citationsSeparator = '#####'
+ with open(citationsFilename, "r") as f:
+ citations = f.readlines()
+ for line in citations:
+ if citationsSeparator not in line:
+ continue
+ sections = line.strip().split(citationsSeparator)
+ if len(sections) != 3:
+ continue
+ title = sections[1]
+ link = sections[2]
+ citationsStr += \
+ '
' + title + ''
+ citationsStr += '
\n'
+
dateAndLocation = ''
if endpoint != 'newshare' and \
endpoint != 'newreport' and \
@@ -3050,7 +3074,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
newPostForm += \
' \n'
- newPostForm += extraFields+dateAndLocation
+ newPostForm += extraFields + citationsStr + dateAndLocation
if not mediaInstance or replyStr:
newPostForm += newPostImageSection
newPostForm += ' \n'