Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not split keywords #253

Open
jze opened this issue Jul 3, 2023 · 2 comments
Open

do not split keywords #253

jze opened this issue Jul 3, 2023 · 2 comments

Comments

@jze
Copy link
Contributor

jze commented Jul 3, 2023

Currently keywords are split after comma:

# Split keywords with commas
keywords_with_commas = [k for k in keywords if ',' in k]
for keyword in keywords_with_commas:
keywords.remove(keyword)
keywords.extend([k.strip() for k in keyword.split(',')])

In the field of chemistry there are keywords that contains commas. They will be destroyed by this. Therefore, keywords should not be split or at least this behavior should be configurable.

@amercader
Copy link
Member

@jze Back in ancient times this was implemented to prevent validation errors: f90e8ad Perhaps this is no longer needed in modern CKAN versions, or perhaps we still need to escape them somehow. If you could investigate what happens when commas are allowed and/or some workarounds we can definitely implement something to allow it.

@thorge
Copy link

thorge commented Nov 22, 2023

In the DCAT specification, keywords are treated as literals, indicating that special characters should be permitted. In our implementation, we have commented out the code responsible for splitting keywords, and it hasn't resulted in any adverse effects. However, other might experience issues with this..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants