Escape # (sort of) correctly.

This commit is contained in:
Simon Quigley 2018-08-02 20:27:25 -05:00
parent c1110e2daf
commit 34bd802c8a
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
---
title: This Week in Lubuntu Development \#1
title: This Week in Lubuntu Development POUND1
slug: this-week-in-lubuntu-development-1
type: newsletter

View File

@ -65,6 +65,8 @@ def updatepost(infoyaml, md, post=None, title=None, slug=None):
if not slug:
slug = infoyaml["slug"]
title = title.replace("POUND", "#")
post.title = title
post.content = md
post.post_status = "publish"
@ -84,7 +86,7 @@ def main():
post = None
for post in posts:
if post.title == infoyaml["title"]:
if post.title == infoyaml["title"].replace("POUND", "#"):
updatepost(post=post, title=post.title, infoyaml=infoyaml, md=md)
post = True
break