Skip to content

Commit 16cd851

Browse files
committed
#91 added an escape filter to the template fix the issue of urls not
showing in the generated attribution file.
1 parent fe5ab1b commit 16cd851

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

about_code_tool/about.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ def generate_attribution(self, template_path='templates/default.html',
10971097
license_key = []
10981098
license_text = []
10991099
license_dict = {}
1100-
common_license = ['GPL 2.0','OpenSSL/SSLeay License', 'Apache 2.0', 'BSD-Modified']
1100+
common_license = ['GPL 2.0','OpenSSL/SSLeay License', 'Apache 2.0', 'BSD-Modified', 'CC-BY-SA-3.0']
11011101
for about_object in self:
11021102
about_relative_path = '/'+ about_object.location.partition(self.user_provided_path)[2]
11031103
if not limit_to or about_relative_path in limit_to:

about_code_tool/templates/default.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h3 class="component-name">{{ about_object.name }}
7070
</a>
7171
is available at the end of this document.</p>
7272
{% else %}
73-
<pre>{{ license_dicts[about_object.dje_license] }}</pre>
73+
<pre>{{ license_dicts[about_object.dje_license]|e }}</pre>
7474
{% endif %}
7575
{% elif about_object.license_text_file in license_dicts.keys() %}
7676
{% if about_object.license_text_file in common_licenses %}
@@ -80,18 +80,18 @@ <h3 class="component-name">{{ about_object.name }}
8080
</a>
8181
is available at the end of this document.</p>
8282
{% else %}
83-
<pre>{{ license_dicts[about_object.license_text_file] }}</pre>
83+
<pre>{{ license_dicts[about_object.license_text_file]|e }}</pre>
8484
{% endif %}
8585
{% endif %}
8686
</div>
8787
{% endfor %}
8888
<hr>
8989

90-
<h3>Licenses Used in This Product</h3>
90+
<h3>Common Licenses Used in This Product</h3>
9191
{% for index in range(license_keys | count) %}
9292
{% if license_keys[index] in common_licenses %}
9393
<h3 id="component-license-{{ license_keys[index] }}">{{ license_keys[index] }}</h3>
94-
<pre>{{ license_texts[index] }}</pre>
94+
<pre>{{ license_texts[index]|e }}</pre>
9595
{% endif %}
9696
{% endfor %}
9797
<h3><a id="End">End</a></h3>

0 commit comments

Comments
 (0)