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

Generate complaint path URLs with clean IDs #474

Merged
merged 2 commits into from Oct 12, 2023
Merged

Conversation

contolini
Copy link
Member

@contolini contolini commented Oct 12, 2023

We have a function to strip HTML tags like <em> out of complaint IDs before rendering them. It was erroneously being applied only to the rendered ID numbers and not also the URLs that get generated from the ID numbers.

To see the bug in action, try clicking on the complaint that appears in these search results:

https://www.consumerfinance.gov/data-research/consumer-complaints/search/?date_received_max=2023-10-12&date_received_min=2020-10-12&page=1&searchField=all&searchText=4340364&size=25&sort=created_date_desc&tab=List

See DATAP-1210

Testing

  • yarn test ComplaintCard.spec.js passes
  • Searching for 4340364 and clicking on the complaint in the results should no longer show <em> in the URL.

Checklist

  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows the standards laid out in the front end playbook
  • Passes all existing automated tests
  • New functions include new tests
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged
  • Visually tested in supported browsers and devices
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)

We have a function to strip HTML tags like <em> out of complaint IDs
before rendering them. It was erroneously being applied only to the rendered
ID numbers and not also the URLs that get generated from the ID numbers.

To see the bug in action, try clicking on the complaint that appears in
these search results:

https://www.consumerfinance.gov/data-research/consumer-complaints/search/?date_received_max=2023-10-12&date_received_min=2020-10-12&page=1&searchField=all&searchText=4340364&size=25&sort=created_date_desc&tab=List

See DATAP-1210
Copy link
Contributor

@wwhorton wwhorton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@wwhorton wwhorton added this pull request to the merge queue Oct 12, 2023
Merged via the queue into main with commit ada126f Oct 12, 2023
2 checks passed
@wwhorton wwhorton deleted the fix-complaint-urls branch October 12, 2023 21:47
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

Successfully merging this pull request may close these issues.

None yet

2 participants