2013-07-13 02:52:47 -04:00
|
|
|
.file-content.image_file
|
2016-02-18 18:19:43 -05:00
|
|
|
- if blob.svg?
|
2016-02-17 05:08:47 -05:00
|
|
|
- # We need to scrub SVG but we cannot do so in the RawController: it would
|
|
|
|
- # be wrong/strange if RawController modified the data.
|
2016-02-16 11:01:25 -05:00
|
|
|
- blob.load_all_data!(@repository)
|
|
|
|
- blob = sanitize_svg(blob)
|
2016-02-17 05:08:47 -05:00
|
|
|
%img{src: "data:#{blob.mime_type};base64,#{Base64.encode64(blob.data)}"}
|
2016-02-16 11:01:25 -05:00
|
|
|
- else
|
2016-03-03 11:59:47 -05:00
|
|
|
%img{src: namespace_project_raw_path(@project.namespace, @project, tree_join(@commit.id, blob.path))}
|