How would the developer escape HTML in a template using Adobe Commerce 2.4.0 and above?

An Adobe Commerce developer needs to output the width of a product on the product description page.

How would the developer escape HTML in a template using Adobe Commerce 2.4.0 and above?
A . <?=$block->escaphtml($serviceModel->getWidth()) ?>
B. <?= $escaper->escapHtml($viewModel->getwidth())?>
C. <?=$escaper->escape($viewModel->getWidth()) ?>

Answer: B

Latest AD0-E710 Practice Questions with 94 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
0 Comments