use yaml.SafeLoader
This commit is contained in:
parent
cc5721610c
commit
155fedb7b7
2
event.py
2
event.py
@ -33,7 +33,7 @@ class Index( object ):
|
|||||||
def read( self ):
|
def read( self ):
|
||||||
indata = open( self.path, 'r', encoding = "utf-8" ).read()
|
indata = open( self.path, 'r', encoding = "utf-8" ).read()
|
||||||
( pre, yamldata, docdata ) = re.split( "^---$", indata, flags = re.MULTILINE )
|
( pre, yamldata, docdata ) = re.split( "^---$", indata, flags = re.MULTILINE )
|
||||||
self.fields = yaml.load( yamldata )
|
self.fields = yaml.load( yamldata, Loader = yaml.SafeLoader )
|
||||||
self.doc = docdata.strip()
|
self.doc = docdata.strip()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user