Skip to content

Commit

Permalink
fix: hotfix to sanitize export contents
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesvedder committed Sep 4, 2024
1 parent 7c1fe6f commit a462b33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion designer_v2/lib/features/analyze/study_export_zip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ extension StudyExportZipX on StudyExportData {
};

files.forEach((filename, content) {
final archiveFile = ArchiveFile.string(filename, content);
final archiveFile = ArchiveFile.string(
filename,
// todo sanitize contents manually until archive v4 is released
content.replaceAll('’', "'").replaceAll('…', '...'),
);
archive.addFile(archiveFile);
});

Expand Down
2 changes: 1 addition & 1 deletion designer_v2/lib/utils/file_download.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dynamic downloadFile({required String fileContent, required String filename}) {
void downloadBytes({required List<int> bytes, required String filename}) {
if (!kIsWeb) {
throw Exception(
"The StudyU designer only support the web platform".hardcoded,
"The StudyU Designer only support the web platform".hardcoded,
);
}
final content = base64Encode(bytes);
Expand Down

0 comments on commit a462b33

Please sign in to comment.