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

APIv4: Normalize option list descriptions as plain text #19237

Merged

Conversation

colemanw
Copy link
Member

Overview

Ensure the description field comes through as plain text when fetching option lists from APIv4.

Before

image

After

image

Technical Details

Our schema is inconsistent about whether description fields allow html, but it's usually assumed to be plain text, so this PR uses strip_tags() to standardize it.

Our schema is inconsistent about whether `description` fields allow html,
but it's usually assumed to be plain text, so we strip_tags() to standardize it.
@civibot
Copy link

civibot bot commented Dec 17, 2020

(Standard links)

@civibot civibot bot added the master label Dec 17, 2020
@eileenmcnaughton
Copy link
Contributor

This only affects searchkit which remains fast moving code. I'm testing intermittently rather than each PR

@eileenmcnaughton eileenmcnaughton merged commit beaabeb into civicrm:master Dec 20, 2020
@eileenmcnaughton eileenmcnaughton deleted the stripTagsFromOptionDescription branch December 20, 2020 23:23
@colemanw
Copy link
Member Author

Thanks @eileenmcnaughton.
This actually affects the whole of APIv4 but I feel like it's the right fix, as one of its purposes is to smooth out irregularities and quirks in our schema.

@eileenmcnaughton
Copy link
Contributor

@colemanw argh you are right - ping @totten in case I missed any caveats on this

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

Successfully merging this pull request may close these issues.

2 participants