Comma in tag in sidecar during import causes truncation of tag
Describe the bug/issue
Importing a photo with a sidecar XMP file with a comma in a tag causes the tag to be truncated to only the data before the tag. This also deletes any nested tags.
For example, <rdf:li>animal|bird|Sandpipers, Phalaropes, and Allies|Wilson's Snipe</rdf:li> becomes <rdf:li>animal|bird|Sandpipers</rdf:li> after import.
To Reproduce
- Ensure "write sidecar for each image" is enabled in the settings.
- Add a tag to a photo where one of the tags contains a comma.
- Copy the photo and XMP file to another computer or instance of Darktable.
- Import the photo.
- Inspect the tags associated with the photo as well as the XMP file alongside the photo.
- The tag should be truncated.
Expected behavior The tag should import without truncation.
Screenshots

Platform
- darktable version : 3.0.1
- OS : Linux kernel 5.4.0-109-generic
- Linux - Distro : Mint 20.3
- Memory : 16 GB
- Graphics card : NVidia GeForce GTX 1060 3 GB
- Graphics driver : 510.60.02
- OpenCL installed : No
- Xorg : 7.7+19ubuntu14
- Desktop : Cinnamon 5.2.7
- gcc : 9.4.0
I realized my Darktable version was quite out of date, added the repository, updated to 3.8.0, and the issue still occurs.
Are you able to update to 3.8.1? I remember quite a few tagging issues being resolved in 3.8.1.
I backed up my .config/darktable folder and deleted it before trying each 3.8.1-1.1_amd64 and 3.9.0~git1346.5849f277-1_amd64 via the binary .deb packages, then I verified the contents of the XMP file before importing the photo into the library. No differences in behavior.
This issue did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.
I run Darktable 4.0.0 on Ubuntu 22.04 (from OBS) and it looks like this is still present. Package version: 4.0.0-1.1_amd64.
This issue did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.
This issue was closed because it has been inactive for 300 days since being marked as stale. Please check if the newest release or nightly build has it fixed. Please, create a new issue if the issue is not fixed.