Skip to content

Commit 38bc5d6

Browse files
diptanilsahamergify[bot]
authored andcommitted
fix(templates): escape attachment file_url and file_name in order.html and projects.html
(cherry picked from commit d9760bb)
1 parent a93d715 commit 38bc5d6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

erpnext/templates/pages/order.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ <h3 class="m-0">{{ doc.name }}</h3>
140140
<div class="col-sm-12">
141141
{% for attachment in attachments %}
142142
<p class="small">
143-
<a href="{{ attachment.file_url }}" target="blank"> {{ attachment.file_name }} </a>
143+
<a href="{{ attachment.file_url|e }}" target="blank"> {{ attachment.file_name|e }} </a>
144144
</p>
145145
{% endfor %}
146146
</div>

erpnext/templates/pages/projects.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ <h4>{{ _("Attachments") }}</h4>
8282
<div class="project-attachments">
8383
{% for attachment in doc.attachments %}
8484
<div class="attachment">
85-
<a class="no-decoration attachment-link" href="{{ attachment.file_url }}" target="blank">
85+
<a class="no-decoration attachment-link" href="{{ attachment.file_url|e }}" target="blank">
8686
<div class="row">
8787
<div class="col-xs-9">
8888
<span class="indicator red file-name">
89-
{{ attachment.file_name }}</span>
89+
{{ attachment.file_name|e }}</span>
9090
</div>
9191
<div class="col-xs-3">
9292
<span class="pull-right file-size">{{ attachment.file_size }}</span>

0 commit comments

Comments
 (0)