Thesaurus: Backslash not allowed in Description of entries?

Started by thrinn, August 19, 2023, 07:10:16 PM

Previous topic - Next topic

thrinn

In the Thesaurus Manager, the Properties panel which is available for each entry allows us to enter a "Description", among other information. But it looks as if the backslash is a non-valid character here: As soon as I change the Description to some text containing at least one backslash, my change is silently ignored and set back to the previous value as soon as I click on another entry.

I discovered this for Keywords, but I confirmed that this behaviour is the same also for other tags.

To check:
  • Open the Thesaurus Manager.
  • Choose any entry and enter some text (without backslashes) into the Description field. E.g. "1st description"
  • Click on another entry, then again on the entry you just changed. Description is filled => OK so far.
  • Now change the description e.g. to "\TEST". It must at least contain one backslash.
  • Click on another entry, then again on the entry you just changed. The description has reverted back to "1st description".

I did not expect that, because the description we can enter e.g. in the properties panel of an category does allow backslashes.

Is this behaviour intended? Are there other characters that are not allowed in the Description of Thesaurus entries?

Thorsten
Win 10 / 64, IMatch 2018, IMA

thrinn

Additional info: This is some issue with the Thesaurus Manager editor only: I can export the Thesaurus to an IMTHS file, change the "desc" attribute to include some backslashes, and reimport the IMTHS file. This way, the backslashes are there. And they stay there also after closing und reopening the Thesaurus manager.

<elem xml:id="54C30B2D-5102-42DA-875A-A3D9294C72AC" group="true">
 <e xml:lang="" desc="Shortcut entries which produce multiple linked keywords">ABK</e>
 <elem xml:id="1ECBF5B1-4229-4DA2-B6FE-1E0B7B13425A">
 <e xml:lang="" desc="1st description WITH ADDITIONAL \\\">KAz</e>
 </elem>
</elem>

But I can not change the description in the editor.
Thorsten
Win 10 / 64, IMatch 2018, IMA

Mario

That's caused by a thesaurus-internal validation.
The routine that updates the description validates the supplied value and disallows \ and |.
The same validation is used for thesaurus paths, values, synonyms, links etc.

I don't recall why I've added this validation also to descriptions for IMatch 5 (this is how long this validation is in place for descriptions no user ever complained about this).

I don't think it is needed for descriptions (?).
I will remove the validation for the next release.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook