@@ -195,7 +195,7 @@ class QuipProcessor {
195
195
this . logger . debug ( `_processReference: replacement=${ reference . replacement } , path=${ path } ` ) ;
196
196
return html . replace ( reference . replacement , path ) ;
197
197
}
198
-
198
+
199
199
_renderDocumentHtml ( html , title , path ) {
200
200
const pathDeepness = path . split ( "/" ) . length - 1 ;
201
201
@@ -217,7 +217,7 @@ class QuipProcessor {
217
217
218
218
return html ;
219
219
}
220
-
220
+
221
221
async _getThreadMessagesHtml ( quipThread , path ) {
222
222
let html = '' ;
223
223
const pathDeepness = path . split ( "/" ) . length - 1 ;
@@ -320,12 +320,12 @@ class QuipProcessor {
320
320
async _processDocumentThread ( quipThread , path ) {
321
321
const pathDeepness = path . split ( "/" ) . length - 1 ;
322
322
let threadHtml = quipThread . html ;
323
-
323
+
324
324
//look up for images in html
325
325
let matches = this . _getMatchGroups ( threadHtml ,
326
326
"src='(/blob/([\\w-]+)/([\\w-]+))'" ,
327
327
[ 'replacement' , 'threadId' , 'blobId' ] ) ;
328
-
328
+
329
329
//replace blob references for images
330
330
for ( const image of matches ) {
331
331
threadHtml = await this . _processFile ( threadHtml , image , path , this . options . embeddedImages ) ;
@@ -423,7 +423,7 @@ class QuipProcessor {
423
423
async _processFolders ( quipFolders , path ) {
424
424
const promises = [ ] ;
425
425
for ( const index in quipFolders ) {
426
- promises . push ( this . _processFolder ( quipFolders [ index ] , `${ path } ${ quipFolders [ index ] . folder . title } /` ) ) ;
426
+ promises . push ( this . _processFolder ( quipFolders [ index ] , `${ path } ${ sanitizeFilename ( quipFolders [ index ] . folder . title ) } /` ) ) ;
427
427
}
428
428
await Promise . all ( promises ) ;
429
429
}
@@ -549,4 +549,4 @@ class QuipProcessor {
549
549
}
550
550
}
551
551
552
- module . exports = QuipProcessor ;
552
+ module . exports = QuipProcessor ;
0 commit comments