From 0a4383b895d169670a3c25c52dcab4e8e656f182 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sat, 1 Jun 2024 16:02:36 +0200 Subject: news.py: Fixed error when using Python 3.8 or later cgi.escape was removed in favour of html.escape. --- news.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'news.py') diff --git a/news.py b/news.py index f5bbb52..531445a 100755 --- a/news.py +++ b/news.py @@ -124,7 +124,7 @@ class JSONWriter(BasicWriter): entry, author = entry.rstrip('\n').rsplit('\n', 1) self.stream.write('"title":"%s",' % title.format(**{'title':NOPFmt()})) # FIXME: assumes the first line is always the title self.stream.write('"date":"%s",' % date.format(**{'date':NOPFmt()})) # FIXME: assumes the second line is always the date - self.stream.write('"author":"%s",' % author.format(**{'author':NOPFmt()})) # FIXME: assumes the second line is always the date + self.stream.write('"author":"%s",' % author.format(**{'author':NOPFmt()})) # FIXME: assumes the last line is always the author self.stream.write('"html":"') entry = entry.lstrip('\n') entry = entry.replace('\n\n', '
') -- cgit v1.2.3-70-g09d2