From 4fff4c0c88ce1baaea68ead8562abad88bdcdcfe Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Sat, 9 Dec 2023 16:06:16 +0100 Subject: [PATCH 1/2] fix(XbelSerializer): titles need their own element fixes #1450 Signed-off-by: Marcel Klehr <mklehr@gmx.net> --- src/lib/serializers/Xbel.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lib/serializers/Xbel.ts b/src/lib/serializers/Xbel.ts index bc3fea29cb..8cfbe83acc 100644 --- a/src/lib/serializers/Xbel.ts +++ b/src/lib/serializers/Xbel.ts @@ -41,13 +41,13 @@ class XbelSerializer implements Serializer { id: parseInt(node[':@']['@_id']), parentId: folder.id, url: node[':@']['@_href'], - title: node.bookmark?.[0]?.['#text'] || '', + title: node.bookmark?.[0]?.title?.[0]?.['#text'] || '', location: ItemLocation.SERVER, }) } else if (typeof node.folder !== 'undefined') { item = new Folder({ id: parseInt(node[':@']?.['@_id']), - title: node[':@']?.['@_title'] || '', + title: node.folder?.[0]?.title?.[0]?.['#text'] || '', parentId: folder.id, location: ItemLocation.SERVER, }) @@ -66,7 +66,7 @@ class XbelSerializer implements Serializer { if (child instanceof Bookmark) { return { bookmark: [ - {'#text': child.title} + {title: [{'#text': child.title}]} ], ':@': { '@_href': child.url, @@ -77,10 +77,12 @@ class XbelSerializer implements Serializer { if (child instanceof Folder) { return { - folder: this._serializeFolder(child), + folder: [ + {title: [{'#text': child.title}]}, + ...this._serializeFolder(child) + ], ':@': { ...('id' in child && {'@_id': String(child.id)}), - '@_title': child.title, } } } From db9c49c6b6ce2839897d9fa1908803fd4e2e71b3 Mon Sep 17 00:00:00 2001 From: Marcel Klehr <mklehr@gmx.net> Date: Sat, 9 Dec 2023 16:32:42 +0100 Subject: [PATCH 2/2] v5.0.1 Signed-off-by: Marcel Klehr <mklehr@gmx.net> --- CHANGELOG.md | 6 ++++++ android/app/build.gradle | 4 ++-- manifest.chrome.json | 2 +- manifest.firefox.json | 2 +- manifest.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 805e2f54a0..c6bab02dd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [5.0.1] - 2023-12-09 + +### Fixed + +- Fixes XBEL parser + ## [5.0.0] - 2023-12-09 ## New diff --git a/android/app/build.gradle b/android/app/build.gradle index f3181be801..3551cf2f43 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "org.handmadeideas.floccus" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 5000000 - versionName "5.0.0" + versionCode 5000001 + versionName "5.0.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/manifest.chrome.json b/manifest.chrome.json index 928a03dba4..945e5dc369 100644 --- a/manifest.chrome.json +++ b/manifest.chrome.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "floccus bookmarks sync", "short_name": "floccus", - "version": "5.0.0", + "version": "5.0.1", "description": "__MSG_DescriptionExtension__", "icons": { "48": "icons/logo.png", diff --git a/manifest.firefox.json b/manifest.firefox.json index f40ccafec5..a63a583b1a 100644 --- a/manifest.firefox.json +++ b/manifest.firefox.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "floccus bookmarks sync", "short_name": "floccus", - "version": "5.0.0", + "version": "5.0.1", "description": "__MSG_DescriptionExtension__", "icons": { "48": "icons/logo.png", diff --git a/manifest.json b/manifest.json index 928a03dba4..945e5dc369 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "floccus bookmarks sync", "short_name": "floccus", - "version": "5.0.0", + "version": "5.0.1", "description": "__MSG_DescriptionExtension__", "icons": { "48": "icons/logo.png", diff --git a/package-lock.json b/package-lock.json index 21e6353c78..59cf6b0ac5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "floccus", - "version": "5.0.0", + "version": "5.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "floccus", - "version": "5.0.0", + "version": "5.0.1", "license": "MPL-2.0", "dependencies": { "@byteowls/capacitor-oauth2": "4.x", diff --git a/package.json b/package.json index a3f6832acd..41da63d61a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "floccus", - "version": "5.0.0", + "version": "5.0.1", "description": "Sync your bookmarks privately across browsers and devices", "scripts": { "build": "gulp",