diff --git a/packages/sp/files/types.ts b/packages/sp/files/types.ts index e7d89b112..3e7720123 100644 --- a/packages/sp/files/types.ts +++ b/packages/sp/files/types.ts @@ -186,7 +186,8 @@ export class _File extends ReadableFile { throw Error("The maximum comment length is 1023 characters."); } - return spPost(File(this, `checkin(comment='${encodePath(comment)}',checkintype=${checkinType})`)); + return spPost(File(this, `checkin(comment=@a2,checkintype=@a3)?@a2=${encodeURIComponent(`'${comment.replace(/'/g, "''")}'`)}&@a3=${checkinType}`)); + } /**