Fix SVG blob rendering
This commit is contained in:
parent
bbbfdba0b9
commit
15126fc70f
1 changed files with 7 additions and 1 deletions
|
@ -1,2 +1,8 @@
|
|||
.file-content.image_file
|
||||
- if blob_svg?(blob)
|
||||
- # We need to scrub SVG but we cannot do so in the RawController
|
||||
- blob.load_all_data!(@repository)
|
||||
- blob = sanitize_svg(blob)
|
||||
%img{ src: "data:#{blob.mime_type};base64,#{Base64.encode64(blob.data)}"}
|
||||
- else
|
||||
%img{ src: namespace_project_raw_path(@project.namespace, @project, @id)}
|
||||
|
|
Loading…
Reference in a new issue