fix(app): set lone-surrogate texts aside or refuse them with a message (L1)

A draft the core refuses as lone_surrogate is unreadable content: it
goes to osteo:quarantine:draft verbatim with the existing notice. An
import is refused as ImportError('lone_surrogate') with the owner's
wording (home.import.error_lone_surrogate, FR/EN), the file untouched.
The publish gate reads the kind as invalid_shape. Tests on the real
core: quarantine keeps the exact text, an editor action leaves the
report as it was, normal text with pairs and literal backslashes reads
unchanged.
This commit is contained in:
bchanot committed 2026-10-14 21:49:39 +02:00
1 parent 20d03cf7fd
commit da8a0370cb
12 files changed
+151 -11

No files matched your search

+2
View File
@@ -103,6 +103,8 @@ function importErrorMessage(err: unknown, t: Translate): string {
return t('home.import.error_attachment_stripped')
case 'no_attachment':
return t('home.import.error_no_attachment')
case 'lone_surrogate':
return t('home.import.error_lone_surrogate')
case 'core_unavailable':
return t('home.import.error_core_unavailable')
}