-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
Since bump 2.14.2 builds are failing #363
Comments
I'm not certain that this change is due to the recent bump, since that constant was changed two years ago: #339. Not really sure why this just started failing for you now. What is |
Hmm okay, was there a breaking change from 2.14.0 to 2.14.1 ? Thank you very much for the hint though! I rebuilt the ContentFormatter using allowlist and it is working now! |
I got this too bumping gems to 2.14.2:
... however, this is an error caused by an out of date Thredded gem. There is a new thredded gem version that uses V2.14.2. |
Hello,
I wanted to inform you that since the bump to 2.14.2 my application is not building anymore as it cannot find the constant anymore:
<class:ContentFormatter>':
uninitialized constant HTML::Pipeline::SanitizationFilter::WHITELIST (NameError)`I cannot build/start my rails server anymore. This was not the case if I change the version back to 2.14.0 in my Gemfile.lock
is there anything that can be done about this? Am I missing something out?
The "ContentFormatter" class, where the error is thrown / the uninitialized constant looks like this:
self.whitelist = HTML::Pipeline::SanitizationFilter::WHITELIST.deep_merge( elements: HTML::Pipeline::SanitizationFilter::WHITELIST[:elements] + %w[abbr iframe span figure figcaption], transformers: HTML::Pipeline::SanitizationFilter::WHITELIST[:transformers] + [ ->(env) { next unless env[:node_name] == 'a' a_tag = env[:node] a_tag['href'] ||= '#' if a_tag['href'] =~ %r{^(?:[a-z]+:)?//} a_tag['target'] = '_blank' a_tag['rel'] = 'nofollow noopener' end } ], attributes: { 'a' => %w[href rel], 'abbr' => %w[title], 'span' => %w[class], 'div' => %w[class], 'img' => %w[src longdesc class], 'th' => %w[style], 'td' => %w[style], :all => HTML::Pipeline::SanitizationFilter::WHITELIST[:attributes][:all] + %w[aria-expanded aria-label aria-labelledby aria-live aria-hidden aria-pressed role], }, css: { properties: %w[text-align], } )
The text was updated successfully, but these errors were encountered: