summaryrefslogtreecommitdiff
path: root/app/views/projects/blob/_svg.html.haml
blob: 93be58fc65826f614ec4edc9ec8a111cb793b561 (plain)
1
2
3
4
5
6
7
8
9
- if blob.size_within_svg_limits?
  -# We need to scrub SVG but we cannot do so in the RawController: it would
  -# be wrong/strange if RawController modified the data.
  - blob.load_all_data!(@repository)
  - blob = sanitize_svg(blob)
  .file-content.image_file
    %img{ src: "data:#{blob.mime_type};base64,#{Base64.encode64(blob.data)}", alt: blob.name }
- else
  = render 'too_large'