Skip to content

Conversation

@brianjgeiger
Copy link
Contributor

Purpose

Ensure that special characters like <, >, and & do not render as their encoded version in the display of the Registries custom metadata field. Note that this does not affect the edit field, because the text in the helper couldn't be overridden without breaking it.

Summary of Changes

  • Add helper to fix strings in the templates
  • Apply helper to registries custom metadata display
  • Adjust tests

Side Effects

This is very isolated, so there should be no side effects.

QA Notes

This affects the registries overview page, when there is custom metadata that has &amp;, &lt;, or &gt; coming from the OSF, which happens if you try to save &, <, or > to the field.

Copy link
Contributor

@futa-ikeda futa-ikeda left a comment

Choose a reason for hiding this comment

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

I think a small test file in tests/integration/helpers/fix-string-test.ts to assert that those special characters are getting converted would be beneficial as well

Copy link
Contributor

@futa-ikeda futa-ikeda left a comment

Choose a reason for hiding this comment

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

🚀

@adlius adlius merged commit 64f1c7e into CenterForOpenScience:develop May 18, 2021
@fabmiz fabmiz added this to the 21.5.0 milestone May 28, 2021
@brianjgeiger brianjgeiger deleted the feature/fixstring-helper branch January 20, 2023 15:07
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.

4 participants