Textbundle import does not handle url encoded file names

Testing version:
2.0 10641 Mac (Ventura)

What were you doing:
Importing documents from textbundle files
What feature did you use:
I wanted to import the images as well as the text
What happened:
Images were imported correctly except where the image file name had been html encoded by the app that exported the textbundle . This was commonly where there was a space in the file name e.g. “assets/foo bar.jpg” was linked in the md file as “assets/foo%20bar.jpg”. These files were NOT imported to Bear, presumably because the image file name did not match what was in the assets folder within the textbundle package.
What did you expect to happen:
Bear should handle encoded filenames correctly

Hello there,

I’ve just made a simple test and I can’t simulate it on my end (encoded file names work fine), can you share the TextBundle that didn’t import properly so I can test it?

Best.

Have DM’d with a link to the file

I’ve just done a quick test. You are right, it is not the encoded space that’s the problem, but Bear is not importing any asset whose file name includes a parenthesis

i.e. files names like:
smallbird.jpg, small bird.jpg, smallbird 2.jpg are all handled perfectly

file names:
smallbird(2).jpg, small bird (2).jpg small bird 2).jpg small bird (2.jpg are not imported

I don’t know if there might be similar issues with other “special characters” in filenames. Unfortunately, my image software automatically adds numbers in parentheses to filenames when it generates an image which would otherwise have the same filename as one which already exists in a folder. I think other software does this too (maybe even the filesystem???) so my existing notes have lots of assets whose filenames are formed in this way.

I’ve had this same issue also and can send you also the textbundle file that causes problems. Only the first image is rendered in the note, rest of them are just ![](image%202.jpg) text.

Not that exact name but something like it. I think the source (Craft Mac app) named all the images just image.jpg, image (2).jpg, image (3).jpg.

We should have already solved this internally, it was indeed a problem of the () being encoded/decoded incorrectly.

There is already a new version in review by Apple, so you should expect the fix to land after that update.

Best.

1 Like

Brilliant. Thanks for such a fast and effective response.