From ae87faeae34564a92897938fdb4785d98d204c50 Mon Sep 17 00:00:00 2001 From: Gautam Sheth Date: Fri, 28 Aug 2020 17:25:25 +0530 Subject: [PATCH] Fix #644 - escape single quote in folder explorer --- src/services/FolderExplorerService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/FolderExplorerService.ts b/src/services/FolderExplorerService.ts index c825124cc..fa210ce39 100644 --- a/src/services/FolderExplorerService.ts +++ b/src/services/FolderExplorerService.ts @@ -67,6 +67,7 @@ export class FolderExplorerService implements IFolderExplorerService { let results: IFolder[] = []; try { const web = new Web(webAbsoluteUrl); + folderRelativeUrl = folderRelativeUrl.replace(/\'/ig, "''"); let foldersResult: IFolder[] = await web.getFolderByServerRelativeUrl(folderRelativeUrl).folders.select('Name', 'ServerRelativeUrl').orderBy('Name').get(); results = foldersResult.filter(f => f.Name != "Forms"); } catch (error) {