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

Fix: Sanitize Donation Form CSS #7378

Merged
merged 4 commits into from
May 6, 2024
Merged

Conversation

pauloiankoski
Copy link
Contributor

@pauloiankoski pauloiankoski commented May 1, 2024

Resolves GIVE-696

Description

This pull request sanitizes the content saved in the customCss property of FormSettings by removing any HTML tags added to it. It then ensures that any tag will not be rendered by sanitizing the value of that property when it is displayed.

Affects

Donation Forms custom CSS

Visuals

CleanShot 2024-04-30 at 23 22 10
CleanShot 2024-04-30 at 23 23 15

Testing Instructions

  1. Add HTML tags to the Custom Styles field on VFB
  2. Ensure no HTML tags are rendered in the page

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • [x Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

Copy link
Contributor

@JoshuaHungDinh JoshuaHungDinh left a comment

Choose a reason for hiding this comment

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

Nice, everything works as expected!

Copy link
Member

@rickalday rickalday left a comment

Choose a reason for hiding this comment

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

Passed manual QA tests.

@pauloiankoski pauloiankoski merged commit 6e57353 into develop May 6, 2024
20 checks passed
@pauloiankoski pauloiankoski deleted the fix/sanitize-custom-css branch May 6, 2024 15:42
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.

3 participants