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

2173 - whitelist tags for html sanitizer #2175

Merged
merged 1 commit into from
Oct 16, 2022

Conversation

yasirazgar
Copy link
Contributor

Description

Underline and Strike-through are not applied on in Moment and Strategy posts, as tags are stripped by sanitizer method, globally enabled them.

Corresponding Issue

#2173

Screenshots

Screenshot 2022-10-16 at 12 28 01 PM


Reviewing this pull request? Check out our Code Review Practices guide if you haven't already!

@@ -57,6 +57,8 @@ class Application < Rails::Application
config.i18n.available_locales = Locale.available_locales.sort_by(&:swapcase).map &:to_sym
config.i18n.default_locale = :en

config.action_view.sanitized_allowed_tags = Rails::Html::Sanitizer.white_list_sanitizer.allowed_tags + ['strike', 'u']

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@julianguyen I have whitelisted these two tags globally, let me know If I need to whitelist only in required place.

Copy link
Member

@julianguyen julianguyen left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for fixing this! 🎉

@julianguyen julianguyen merged commit 7b9bf25 into ifmeorg:main Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants