]> cat aescling's git repositories - mastodon.git/commitdiff
Fix SVG files not being correctly included in templates (#16001)
authorClaire <claire.github-309c@sitedethib.com>
Mon, 5 Apr 2021 11:05:49 +0000 (13:05 +0200)
committerGitHub <noreply@github.com>
Mon, 5 Apr 2021 11:05:49 +0000 (13:05 +0200)
In Rails 6.1, raw file inclusion in templates have to be explicitly marked as
HTML-safe, otherwise it's rendered as text.

app/views/layouts/application.html.haml
app/views/layouts/embedded.html.haml

index 436024ee35e46910aefd335a7455193ca7a93281..f5a963e0026f8f9e86e2fb0ef638722fdd476aed 100755 (executable)
@@ -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')
index e4311d342c82ab999922489e6b439f20feb1e404..719c21a9a69a9712ae658ea91241503aa6d429e3 100644 (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')