diff --git a/atst/app.py b/atst/app.py
index 46b017bb..1553679f 100644
--- a/atst/app.py
+++ b/atst/app.py
@@ -57,6 +57,11 @@ def make_flask_callbacks(app):
"atat_permissions": [],
}
+ @app.template_filter('iconSvg')
+ def iconSvg(name):
+ with open('static/icons/'+name+'.svg') as contents:
+ return contents.read()
+
def map_config(config):
return {
diff --git a/templates/components.html b/templates/components.html
index ea214631..a9b566cd 100644
--- a/templates/components.html
+++ b/templates/components.html
@@ -1,6 +1,6 @@
{% macro Icon(name, classes="") -%}
{% autoescape false %}
- {{ svg }}
+ {{ name | iconSvg }}
{% endautoescape %}
{%- endmacro %}