You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
All: Fixes #3955: Fixed sync issue when importing ENEX files that contain new line characters in the source URL attribute
This commit is contained in:
@ -256,9 +256,11 @@ class BaseItem extends BaseModel {
|
||||
propValue = JSON.stringify(propValue);
|
||||
} else if (propValue === null || propValue === undefined) {
|
||||
propValue = '';
|
||||
} else {
|
||||
propValue = `${propValue}`;
|
||||
}
|
||||
|
||||
return propValue;
|
||||
return propValue.replace(/\n/g, '\\n').replace(/\r/g, '\\r');
|
||||
}
|
||||
|
||||
static unserialize_format(type, propName, propValue) {
|
||||
@ -279,7 +281,7 @@ class BaseItem extends BaseModel {
|
||||
propValue = Database.formatValue(ItemClass.fieldType(propName), propValue);
|
||||
}
|
||||
|
||||
return propValue;
|
||||
return typeof propValue === 'string' ? propValue.replace(/\\n/g, '\n').replace(/\\r/g, '\r') : propValue;
|
||||
}
|
||||
|
||||
static async serialize(item, shownKeys = null) {
|
||||
|
Reference in New Issue
Block a user