-
-
Save DomPixie/3a5adca19cead19b3a2a743557c69109 to your computer and use it in GitHub Desktop.
Magento 2 Escaping phtml
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