Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

337
Views
¿Cómo habilitar el uso de la función css url con esponja vegetal?

Lo que ya probé:

 Loofah::HTML5::WhiteList::ACCEPTABLE_CSS_FUNCTIONS.add 'url' Loofah::HTML5::WhiteList::ACCEPTABLE_CSS_PROPERTIES.add 'background-image'

Pero

 Rails::Html::WhiteListSanitizer.new.sanitize_css 'background-image: url(https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png);'

devoluciones ""

Probando con rgb:

 Rails::Html::WhiteListSanitizer.new.sanitize_css 'background-image: rgb(https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png);'

devoluciones

 'background-image:rgb(https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png);'

Con Loofah::HTML5::Scrub.scrub_css tengo los mismos resultados.

Versión de Lofah: 2.13.0

Versión de rieles: 6.1.4.4

Probado en la consola de Rails

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Me temo que no funciona porque el filtro de URL está codificado .

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!