Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def save(id):
title = request.form['title']
content = request.form['content']
_entry = Entry.save_entry(title, content, id)
name = _entry['slug']
date = _entry['date']
status = _entry['status']
if status == 'draft':
filename = os.path.join('./summer/_draft/', name + '.md')
else:
filename = os.path.join('./summer/post/', name + '.md')
open(filename, 'w').close()
newfile = open(filename, 'w')
meta = yaml.safe_dump({
'title': title.encode('utf8'),