-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Sanitize organization name #20393
base: main
Are you sure you want to change the base?
Sanitize organization name #20393
Conversation
Thank you for opening this PR! We appreciate you! For all pull requests coming from third-party forks we will need to A Forem Team member will review this contribution and get back to |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
Closes issue 20376 In this pull request, I addressed an issue related to the HTML rendering of organization names in the application. The problem manifested when special characters, such as '&' in the organization name, were not being properly escaped, leading to unintended rendering in the UI. To resolve this issue, I utilized the built-in `sanitize` method provided by Rails. This ensures that organization names are properly sanitized before being rendered in HTML.
9ec6bff
to
79af2b3
Compare
Prefer to use class OrganizationDecorator def sanitized_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delay. I have to agree with @dambar08 here. The more clean approach here would be to to utilize OrganizationDecorator
instead of manually sanitizing names in multiple places. Let me know if you need any more guideline.
Description
In this pull request, I addressed an issue related to the HTML rendering of organization names in the application. The problem manifested when special characters, such as '&' in the organization name, were not properly escaped, leading to unintended rendering in the UI.
To resolve this issue, I utilized the built-in
sanitize
method provided by Rails. This ensures that organization names are properly sanitized before being rendered in HTML.What type of PR is this? (check all applicable)
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Please replace this line with instructions on how to test your changes, a note
on the devices and browsers this has been tested on, as well as any relevant
images for UI changes.
UI accessibility checklist
If your PR includes UI changes, please utilize this checklist:
Critical
andSerious
issues?For more info, check out the
Forem Accessibility Docs.
Added/updated tests?
We encourage you to keep the code coverage percentage at 80% and above.
have not been included
[optional] Are there any post deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?