Skip to content

Commit

Permalink
use safe_load
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed May 28, 2017
1 parent 936293f commit 5885f69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nikola/post.py
Expand Up @@ -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:
Expand Down

0 comments on commit 5885f69

Please sign in to comment.