#NEWLINE# def _embed_images( dom , rootdirs ) : #NEWLINE# #INDENT# for img in dom . getElementsByTagName ( 'img' ) : #NEWLINE# #INDENT# imgfile = _resolve_path ( img . getAttribute ( 'src' ) , rootdirs ) #NEWLINE# img . setAttribute ( 'src' , serve . make_base64 ( imgfile ) )