Skip to content

Commit dd967c0

Browse files
committed
Fix encoding
1 parent 50f08dc commit dd967c0

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

src/controllers/CatalogPricingRulesController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function actionIndex(?string $storeHandle = null): Response
103103

104104
$tableData[] = [
105105
'id' => $pcr->id,
106-
'title' => Html::encode(Craft::t('site', $pcr->name)),
106+
'title' => Craft::t('site', $pcr->name),
107107
'url' => $pcr->getCpEditUrl(),
108108
'status' => $pcr->enabled ? true : false,
109109
'duration' => $dateRange,

src/controllers/DiscountsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public function actionTableData(): Response
275275

276276
$tableData[] = [
277277
'id' => $item['id'],
278-
'title' => Html::encode(Craft::t('site', $item['name'])),
278+
'title' => Craft::t('site', $item['name']),
279279
'url' => UrlHelper::cpUrl('commerce/store-management/' . $store->handle . '/discounts/' . $item['id']),
280280
'status' => (bool)$item['enabled'],
281281
'duration' => $dateRange,

src/elements/Order.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2725,7 +2725,8 @@ public function getCustomerLinkHtml(): string
27252725
{
27262726
$html = '';
27272727
if ($user = $this->getCustomer()) {
2728-
$html = Html::tag('a', $user->email, ['href' => $user->getCpEditUrl()]);
2728+
$email = Html::encode($user->email);
2729+
$html = Html::tag('a', $email, ['href' => $user->getCpEditUrl()]);
27292730
}
27302731

27312732
return $html;

src/templates/settings/emails/index.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
{% for email in storeEmails %}
4747
{% set tableData = tableData|merge([{
4848
id: email.id,
49-
title: email.name|t('site')|e,
49+
title: email.name|t('site'),
5050
status: email.enabled ? true : false,
5151
url: email.getCpEditUrl(),
5252
subject: email.subject|t('site')|e,
@@ -66,7 +66,7 @@
6666
{ name: 'template', title: Craft.t('commerce', 'Template Path'),
6767
callback: function(value) {
6868
if (value) {
69-
return '<span class="code">'+Craft.escapeHtml(value)+'</span>';
69+
return '<span class="code">'+value+'</span>';
7070
}
7171

7272
return '';

src/templates/settings/gateways/index.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
{% for gateway in gateways %}
5454
{% set tableData = tableData|merge([{
5555
id: gateway.id,
56-
title: gateway.name|t('site')|e,
56+
title: gateway.name|t('site'),
5757
url: gateway.getCpEditUrl(),
58-
handle: gateway.handle|e,
58+
handle: gateway.handle,
5959
type: {
6060
missing: gateway is missing ? true : false,
6161
name: (gateway is missing? gateway.expectedType : gateway.displayName())|e

src/templates/settings/pdfs/index.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
{% for pdf in storePdfs %}
5151
{% set tableData = tableData|merge([{
5252
id: pdf.id,
53-
title: pdf.name|t('site')|e,
54-
handle: pdf.handle|e,
53+
title: pdf.name|t('site'),
54+
handle: pdf.handle,
5555
status: pdf.enabled ? true : false,
5656
url:pdf.getCpEditUrl(),
5757
isDefault: pdf.isDefault ? true : false,

0 commit comments

Comments
 (0)