Last active
September 12, 2024 13:56
-
-
Save DominicWatts/300d2dd995d442870014d1dde3405516 to your computer and use it in GitHub Desktop.
Magento 2 : Escaping phtml #magento2
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
public function escapeHtml($data, $allowedTags = null) | |
public function escapeHtmlAttr($string, $escapeSingleQuote = true) | |
public function escapeUrl($string) | |
public function encodeUrlParam($string) | |
public function escapeJs($string) | |
public function escapeCss($string) | |
$block->escapeHtml(__("")); | |
<?= $block->escapeHtml(__("")); ?> | |
$block->escapeHtmlAttr(__("")); | |
<?= $block->escapeHtmlAttr(__("")); ?> | |
$block->escapeUrl($block->getUrl('this/and/that')); | |
<?= $block->escapeUrl($block->getUrl('this/and/that')); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment