Skip to content
Permalink
Browse files

use safe_load

  • Loading branch information...
ralsina committed May 28, 2017
1 parent 936293f commit 5885f6960155ea7678316d92d3fb94adf9fb34d1
Showing with 1 addition and 1 deletion.
  1. +1 −1 nikola/post.py
@@ -1033,7 +1033,7 @@ def _get_metadata_from_file(meta_data):
utils.req_missing('pyyaml', 'use YAML metadata', optional=True)
raise ValueError('Error parsing metadata')
idx = meta_data.index('---', 1)
meta = yaml.load('\n'.join(meta_data[1:idx]))
meta = yaml.safe_load('\n'.join(meta_data[1:idx]))
# We expect empty metadata to be '', not None
for k in meta:
if meta[k] is None:

0 comments on commit 5885f69

Please sign in to comment.
You can’t perform that action at this time.