mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-26 21:35:19 +00:00
fix: escape interpolated values in text positions across portal and desk templates (backport #58286) (#58288)
This commit is contained in:
@@ -115,7 +115,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
<a href="/app/event/{{ frappe.utils.escape_html(events[i].name) }}" title="{{ __('Open Event') }}">
|
<a href="/app/event/{{ frappe.utils.escape_html(events[i].name) }}" title="{{ __('Open Event') }}">
|
||||||
{%= events[i].subject %}
|
{%= frappe.utils.escape_html(events[i].subject) %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
@@ -162,7 +162,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
<a href="/app/event/{{ frappe.utils.escape_html(event.name) }}" title="{{ __('Open Event') }}">
|
<a href="/app/event/{{ frappe.utils.escape_html(event.name) }}" title="{{ __('Open Event') }}">
|
||||||
{%= event.subject %}
|
{%= frappe.utils.escape_html(event.subject) %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
{% if addresses %}
|
{% if addresses %}
|
||||||
{% for address in addresses %}
|
{% for address in addresses %}
|
||||||
<address>
|
<address>
|
||||||
{% if address.partner_address %}<p itemprop="address">{{ address.partner_address }}</p>{% endif %}
|
{% if address.partner_address %}<p itemprop="address">{{ address.partner_address | e }}</p>{% endif %}
|
||||||
{% if address.phone %}<p itemprop="telephone">{{ address.phone }}</p>{% endif %}
|
{% if address.phone %}<p itemprop="telephone">{{ address.phone | e }}</p>{% endif %}
|
||||||
{% if address.email %}<p itemprop="email"><span class="fa fa-envelope"></span> {{ address.email }}</p>{% endif %}
|
{% if address.email %}<p itemprop="email"><span class="fa fa-envelope"></span> {{ address.email | e }}</p>{% endif %}
|
||||||
</address>
|
</address>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
{{ doc.name }}
|
{{ doc.name }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-2 project-name">
|
<div class="col-xs-2 project-name">
|
||||||
{{ doc.project_name }}
|
{{ doc.project_name | e }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-3 text-center">
|
<div class="col-xs-3 text-center">
|
||||||
{% if doc.percent_complete %}
|
{% if doc.percent_complete %}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<i class="fa fa-level-up fa-rotate-90"></i>
|
<i class="fa fa-level-up fa-rotate-90"></i>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ task.subject }}</a>
|
{{ task.subject | e }}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2">{{ task.status }}</div>
|
<div class="col-sm-2">{{ task.status }}</div>
|
||||||
<div class="col-sm-2 small text-muted">
|
<div class="col-sm-2 small text-muted">
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<div class="small text-muted items-preview ellipsis ellipsis-width">
|
<div class="small text-muted items-preview ellipsis ellipsis-width">
|
||||||
{{ doc.items_preview }}
|
{{ doc.items_preview | e }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if doc.is_rounded_total_disabled() and doc.get('grand_total') %}
|
{% if doc.is_rounded_total_disabled() and doc.get('grand_total') %}
|
||||||
|
|||||||
@@ -73,11 +73,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="text-right col-2">
|
<div class="text-right col-2">
|
||||||
{%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase Order'] else doc.customer_name %}
|
{%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase Order'] else doc.customer_name %}
|
||||||
<b>{{ party_name }}</b>
|
<b>{{ party_name | e }}</b>
|
||||||
|
|
||||||
{% if doc.contact_display and doc.contact_display != party_name %}
|
{% if doc.contact_display and doc.contact_display != party_name %}
|
||||||
<br>
|
<br>
|
||||||
{{ doc.contact_display }}
|
{{ doc.contact_display | e }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<h4>{{ partner_info.partner_name }}</h4>
|
<h4>{{ partner_info.partner_name }}</h4>
|
||||||
</a>
|
</a>
|
||||||
<p style="color: #999">{{ partner_info.territory }} - {{ partner_info.partner_type }}</p>
|
<p style="color: #999">{{ partner_info.territory }} - {{ partner_info.partner_type }}</p>
|
||||||
<p>{{ partner_info.introduction }}</p>
|
<p>{{ partner_info.introduction | e }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "templates/web.html" %}
|
{% extends "templates/web.html" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{{ doc.project_name }}
|
{{ doc.project_name | e }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block head_include %}
|
{% block head_include %}
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<h3 class="my-account-header">{{ doc.project_name }}</h3>
|
<h3 class="my-account-header">{{ doc.project_name | e }}</h3>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block style %}
|
{% block style %}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ frappe.ready(function () {
|
|||||||
dataType: "json",
|
dataType: "json",
|
||||||
data: {
|
data: {
|
||||||
cmd: "erpnext.templates.pages.projects.get_" + item + "_html",
|
cmd: "erpnext.templates.pages.projects.get_" + item + "_html",
|
||||||
project: "{{ doc.name | e }}",
|
project: frappe.utils.get_url_arg("project"),
|
||||||
item_status: item_status,
|
item_status: item_status,
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
@@ -80,7 +80,7 @@ frappe.ready(function () {
|
|||||||
dataType: "json",
|
dataType: "json",
|
||||||
data: {
|
data: {
|
||||||
cmd: "erpnext.templates.pages.projects.get_" + item + "_html",
|
cmd: "erpnext.templates.pages.projects.get_" + item + "_html",
|
||||||
project: "{{ doc.name | e }}",
|
project: frappe.utils.get_url_arg("project"),
|
||||||
start: start,
|
start: start,
|
||||||
item_status: item_status,
|
item_status: item_status,
|
||||||
},
|
},
|
||||||
@@ -96,7 +96,7 @@ frappe.ready(function () {
|
|||||||
|
|
||||||
var close_item = function (item, item_name) {
|
var close_item = function (item, item_name) {
|
||||||
var args = {
|
var args = {
|
||||||
project: "{{ doc.name | e }}",
|
project: frappe.utils.get_url_arg("project"),
|
||||||
item_name: item_name,
|
item_name: item_name,
|
||||||
};
|
};
|
||||||
frappe.call({
|
frappe.call({
|
||||||
|
|||||||
@@ -49,9 +49,9 @@
|
|||||||
<div class="card card-md h-100 kb-card">
|
<div class="card card-md h-100 kb-card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h6 class="card-subtitle mb-2 text-uppercase small text-muted">
|
<h6 class="card-subtitle mb-2 text-uppercase small text-muted">
|
||||||
{{ favorite_article['category'] }}</h6>
|
{{ favorite_article['category'] | e }}</h6>
|
||||||
<h3 class="card-title">{{ favorite_article['title'] }}</h3>
|
<h3 class="card-title">{{ favorite_article['title'] | e }}</h3>
|
||||||
<p class="card-text">{{ favorite_article['description'] }}</p>
|
<p class="card-text">{{ favorite_article['description'] | e }}</p>
|
||||||
</div>
|
</div>
|
||||||
<a href="{{ favorite_article['route'] | e }}" class="stretched-link"></a>
|
<a href="{{ favorite_article['route'] | e }}" class="stretched-link"></a>
|
||||||
</div>
|
</div>
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
<h5>{{ item['category'].name }}</h5>
|
<h5>{{ item['category'].name }}</h5>
|
||||||
<div>
|
<div>
|
||||||
{% for article in item['articles'] %}
|
{% for article in item['articles'] %}
|
||||||
<a href="{{ article.route | e }}" class="mt-2 d-block">{{ article.title }}</a>
|
<a href="{{ article.route | e }}" class="mt-2 d-block">{{ article.title | e }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user