Instantly share code, notes, and snippets.
Created
November 19, 2020 12:44
-
Star
(1)
1
You must be signed in to star a gist -
Fork
(1)
1
You must be signed in to fork a gist
-
Save jordanvector/524a39a6bb201bb2a82639c490f5bacd to your computer and use it in GitHub Desktop.
2.3.6-Fixed issue with critical error: The following tag(s) are not allowed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 21759562afe3a1b8e6733a6ca1c8d0f8d7f39767 Mon Sep 17 00:00:00 2001 | |
Date: Thu, 19 Nov 2020 07:33:39 -0500 | |
Subject: [PATCH] =?UTF-8?q?Fixed=20issue=20with=20critical=20error:=20The?= | |
=?UTF-8?q?=20following=20tag(s)=20are=20not=20allowed=E2=80=A6?= | |
MIME-Version: 1.0 | |
Content-Type: text/plain; charset=UTF-8 | |
Content-Transfer-Encoding: 8bit | |
--- | |
.../order/creditmemo/items/renderer/default.phtml | 10 +++++++--- | |
.../order/invoice/items/renderer/default.phtml | 6 ++++-- | |
.../templates/order/items/renderer/default.phtml | 9 ++++++--- | |
.../order/shipment/items/renderer/default.phtml | 9 ++++++--- | |
4 files changed, 23 insertions(+), 11 deletions(-) | |
diff --git a/view/frontend/templates/order/creditmemo/items/renderer/default.phtml b/view/frontend/templates/order/creditmemo/items/renderer/default.phtml | |
index 0fc02fd..e34a97d 100644 | |
--- a/view/frontend/templates/order/creditmemo/items/renderer/default.phtml | |
+++ b/view/frontend/templates/order/creditmemo/items/renderer/default.phtml | |
@@ -17,7 +17,7 @@ | |
<?php if (!$block->getPrintStatus()) : ?> | |
<?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?> | |
<dd<?= (isset($_formatedOptionValue['full_view']) ? ' class="tooltip wrapper"' : '') ?>> | |
- <?= $block->escapeHtml($_formatedOptionValue['value'], ['a', 'img']) ?> | |
+ <?= $block->escapeHtml($_formatedOptionValue['value'], ['a']) ?> | |
<?php if (isset($_formatedOptionValue['full_view'])) : ?> | |
<div class="tooltip content"> | |
<dl class="item options"> | |
@@ -53,7 +53,9 @@ | |
<?php endif; ?> | |
<?= $block->escapeHtml($_item->getDescription()) ?> | |
</td> | |
- <td class="col sku" data-th="<?= $block->escapeHtmlAttr(__('SKU')) ?>"><?= /* @noEscape */ $block->prepareSku($block->getSku()) ?></td> | |
+ <td class="col sku" data-th="<?= $block->escapeHtml(__('SKU')) ?>"> | |
+ <?= /* @noEscape */ $block->prepareSku($block->getSku()) ?> | |
+ </td> | |
<td class="col price" data-th="<?= $block->escapeHtmlAttr(__('Price')) ?>"> | |
<?= $block->getItemPriceHtml() ?> | |
</td> | |
@@ -61,7 +63,9 @@ | |
<td class="col subtotal" data-th="<?= $block->escapeHtmlAttr(__('Subtotal')) ?>"> | |
<?= $block->getItemRowTotalHtml() ?> | |
</td> | |
- <td class="col discount" data-th="<?= $block->escapeHtmlAttr(__('Discount Amount')) ?>"><?= /* @noEscape */ $_order->formatPrice(-$_item->getDiscountAmount()) ?></td> | |
+ <td class="col discount" data-th="<?= $block->escapeHtml(__('Discount Amount')) ?>"> | |
+ <?= /* @noEscape */ $_order->formatPrice(-$_item->getDiscountAmount()) ?> | |
+ </td> | |
<td class="col total" data-th="<?= $block->escapeHtmlAttr(__('Row Total')) ?>"> | |
<?= $block->getItemRowTotalAfterDiscountHtml() ?> | |
</td> | |
diff --git a/view/frontend/templates/order/invoice/items/renderer/default.phtml b/view/frontend/templates/order/invoice/items/renderer/default.phtml | |
index 3f02de8..c6dd8ed 100644 | |
--- a/view/frontend/templates/order/invoice/items/renderer/default.phtml | |
+++ b/view/frontend/templates/order/invoice/items/renderer/default.phtml | |
@@ -17,7 +17,7 @@ | |
<?php if (!$block->getPrintStatus()) : ?> | |
<?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?> | |
<dd<?= (isset($_formatedOptionValue['full_view']) ? ' class="tooltip wrapper"' : '') ?>> | |
- <?= $block->escapeHtml($_formatedOptionValue['value'], ['a', 'img']) ?> | |
+ <?= $block->escapeHtml($_formatedOptionValue['value'], ['a']) ?> | |
<?php if (isset($_formatedOptionValue['full_view'])) : ?> | |
<div class="tooltip content"> | |
<dl class="item options"> | |
@@ -39,7 +39,9 @@ | |
<?php endif; ?> | |
<?= $block->escapeHtml($_item->getDescription()) ?> | |
</td> | |
- <td class="col sku" data-th="<?= $block->escapeHtmlAttr(__('SKU')) ?>"><?= /* @noEscape */ $block->prepareSku($block->getSku()) ?></td> | |
+ <td class="col sku" data-th="<?= $block->escapeHtml(__('SKU')) ?>"> | |
+ <?= /* @noEscape */ $block->prepareSku($block->getSku()) ?> | |
+ </td> | |
<td class="col price" data-th="<?= $block->escapeHtmlAttr(__('Price')) ?>"> | |
<?= $block->getItemPriceHtml() ?> | |
</td> | |
diff --git a/view/frontend/templates/order/items/renderer/default.phtml b/view/frontend/templates/order/items/renderer/default.phtml | |
index 39b4e45..5a806c3 100644 | |
--- a/view/frontend/templates/order/items/renderer/default.phtml | |
+++ b/view/frontend/templates/order/items/renderer/default.phtml | |
@@ -17,7 +17,7 @@ $_item = $block->getItem(); | |
<?php if (!$block->getPrintStatus()) : ?> | |
<?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?> | |
<dd<?= (isset($_formatedOptionValue['full_view']) ? ' class="tooltip wrapper"' : '') ?>> | |
- <?= $block->escapeHtml($_formatedOptionValue['value'], ['a', 'img']) ?> | |
+ <?= $block->escapeHtml($_formatedOptionValue['value'], ['a']) ?> | |
<?php if (isset($_formatedOptionValue['full_view'])) : ?> | |
<div class="tooltip content"> | |
<dl class="item options"> | |
@@ -28,7 +28,8 @@ $_item = $block->getItem(); | |
<?php endif; ?> | |
</dd> | |
<?php else : ?> | |
- <dd><?= $block->escapeHtml((isset($_option['print_value']) ? $_option['print_value'] : $_option['value'])) ?></dd> | |
+ <?php $optionValue = isset($_option['print_value']) ? $_option['print_value'] : $_option['value'] ?> | |
+ <dd><?= $block->escapeHtml($optionValue) ?></dd> | |
<?php endif; ?> | |
<?php endforeach; ?> | |
</dl> | |
@@ -39,7 +40,9 @@ $_item = $block->getItem(); | |
<?php endif; ?> | |
<?= $block->escapeHtml($_item->getDescription()) ?> | |
</td> | |
- <td class="col sku" data-th="<?= $block->escapeHtmlAttr(__('SKU')) ?>"><?= /* @noEscape */ $block->prepareSku($block->getSku()) ?></td> | |
+ <td class="col sku" data-th="<?= $block->escapeHtml(__('SKU')) ?>"> | |
+ <?= /* @noEscape */ $block->prepareSku($block->getSku()) ?> | |
+ </td> | |
<td class="col price" data-th="<?= $block->escapeHtmlAttr(__('Price')) ?>"> | |
<?= $block->getItemPriceHtml() ?> | |
</td> | |
diff --git a/view/frontend/templates/order/shipment/items/renderer/default.phtml b/view/frontend/templates/order/shipment/items/renderer/default.phtml | |
index 2dda2c2..86924ef 100644 | |
--- a/view/frontend/templates/order/shipment/items/renderer/default.phtml | |
+++ b/view/frontend/templates/order/shipment/items/renderer/default.phtml | |
@@ -16,7 +16,7 @@ | |
<?php if (!$block->getPrintStatus()) : ?> | |
<?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?> | |
<dd<?= (isset($_formatedOptionValue['full_view']) ? ' class="tooltip wrapper"' : '') ?>> | |
- <?= $block->escapeHtml($_formatedOptionValue['value'], ['a', 'img']) ?> | |
+ <?= $block->escapeHtml($_formatedOptionValue['value'], ['a']) ?> | |
<?php if (isset($_formatedOptionValue['full_view'])) : ?> | |
<div class="tooltip content"> | |
<dl class="item options"> | |
@@ -27,7 +27,8 @@ | |
<?php endif; ?> | |
</dd> | |
<?php else : ?> | |
- <dd><?= $block->escapeHtml((isset($_option['print_value']) ? $_option['print_value'] : $_option['value'])) ?></dd> | |
+ <?php $optionValue = isset($_option['print_value']) ? $_option['print_value'] : $_option['value'] ?> | |
+ <dd><?= $block->escapeHtml($optionValue) ?></dd> | |
<?php endif; ?> | |
<?php endforeach; ?> | |
</dl> | |
@@ -38,6 +39,8 @@ | |
<?php endif; ?> | |
<?= $block->escapeHtml($_item->getDescription()) ?> | |
</td> | |
- <td class="col sku" data-th="<?= $block->escapeHtmlAttr(__('SKU')) ?>"><?= /* @noEscape */ $block->prepareSku($block->getSku()) ?></td> | |
+ <td class="col sku" data-th="<?= $block->escapeHtml(__('SKU')) ?>"> | |
+ <?= /* @noEscape */ $block->prepareSku($block->getSku()) ?> | |
+ </td> | |
<td class="col qty" data-th="<?= $block->escapeHtmlAttr(__('Qty Shipped')) ?>"><?= (int) $_item->getQty() ?></td> | |
</tr> | |
-- | |
2.29.2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment