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

[Bug] Sanitizing institution data harvested from GrSciColl breaks functionality #1982

Open
mickley opened this issue Dec 17, 2024 · 0 comments
Assignees

Comments

@mickley
Copy link

mickley commented Dec 17, 2024

In the institution editor, there is now a call to sanitize all institution data before displaying it using htmlspecialchars(), see:

$instArr = $instManager->cleanOutArray($instArr);

That seems reasonable, however, when I wrote the code to harvest data from GBIF's GrSciColl API, I incorporated several GrSciColl/indexHerbariorum fields and links to Index Herbariorum and GrSciColl in the notes field, using some html. Santitizing with htmlspecialchars unfortunately breaks that functionality. See:

// Add taxonomic coverage to notes, if included

Here's what it should look like:

image

Here's what the sanitizing does:

image

@Atticus29: There's different ways this could be fixed: sanitizing all except the notes, allowing limited html, having more institution editor fields to avoid this need, etc. Up to you as to what works best.

@mickley mickley changed the title Bug when sanitizing institution data harvested from GrSciColl [Bug] Sanitizing institution data harvested from GrSciColl breaks functionality Dec 17, 2024
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

2 participants