Browse Source

Fix SVG files not being correctly included in templates (#16001)

In Rails 6.1, raw file inclusion in templates have to be explicitly marked as
HTML-safe, otherwise it's rendered as text.
closed-social-v3
Claire 3 years ago
committed by GitHub
parent
commit
117f6638d0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      app/views/layouts/application.html.haml
  2. +1
    -1
      app/views/layouts/embedded.html.haml

+ 2
- 2
app/views/layouts/application.html.haml View File

@ -39,5 +39,5 @@
= content_for?(:content) ? yield(:content) : yield
.logo-resources
= render file: Rails.root.join('app', 'javascript', 'images', 'logo_transparent.svg')
= render file: Rails.root.join('app', 'javascript', 'images', 'logo_full.svg')
= raw render file: Rails.root.join('app', 'javascript', 'images', 'logo_transparent.svg')
= raw render file: Rails.root.join('app', 'javascript', 'images', 'logo_full.svg')

+ 1
- 1
app/views/layouts/embedded.html.haml View File

@ -21,4 +21,4 @@
= yield
.logo-resources
= render file: Rails.root.join('app', 'javascript', 'images', 'logo_transparent.svg')
= raw render file: Rails.root.join('app', 'javascript', 'images', 'logo_transparent.svg')

Loading…
Cancel
Save