use yaml.SafeLoader

master
Faelix Incident Handler 5 years ago
parent cc5721610c
commit 155fedb7b7

@ -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…
Cancel
Save