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

Fixes Typography bug with invalid HTML tags in as prop #1765

Merged
merged 7 commits into from
May 15, 2024

Conversation

Mil4n0r
Copy link
Collaborator

@Mil4n0r Mil4n0r commented Jan 18, 2024

Checklist

  • Build process is done without errors. All tests pass in the /lib directory.
  • Self-reviewed the code before submitting.
  • Meets accessibility standards.
  • Added/updated documentation to /website as needed.
  • Added/updated tests as needed.

Description
Modified BaseTypography component to prevent unexpected tags to be assigned to the as prop

Additional context
Some basic unit testing was also added in order to ensure that invalid tags are replaced with "span".

"a" | "blockquote" | "cite" | "code" | "div" | "em" | "figcaption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "pre" | "small" | "span" | "strong"

Discussion: #1842

Closes #1621

@raquelarrojo raquelarrojo self-assigned this Jan 22, 2024
@raquelarrojo raquelarrojo self-requested a review January 22, 2024 08:11
@raquelarrojo raquelarrojo removed their request for review January 30, 2024 15:48
@raquelarrojo raquelarrojo removed their assignment Jan 30, 2024
@Mil4n0r
Copy link
Collaborator Author

Mil4n0r commented Feb 21, 2024

This is closed for now as it requires some discussion regarding what subset of tags is considered valid.

@Mil4n0r Mil4n0r closed this Feb 21, 2024
@Mil4n0r Mil4n0r reopened this Mar 7, 2024
@Mil4n0r Mil4n0r marked this pull request as ready for review March 7, 2024 15:39
@Mil4n0r
Copy link
Collaborator Author

Mil4n0r commented Mar 11, 2024

Reopened.

@kukoc kukoc self-assigned this Apr 19, 2024
@GomezIvann GomezIvann self-requested a review May 15, 2024 12:14
@GomezIvann GomezIvann self-assigned this May 15, 2024
@GomezIvann GomezIvann merged commit 025d9d7 into master May 15, 2024
4 checks passed
@GomezIvann GomezIvann deleted the Mil4n0r/typography-invalid_tags-fix branch May 15, 2024 15:48
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.

Typography allows invalid HTML tags in as prop
4 participants