File tree Expand file tree Collapse file tree 1 file changed +18
-10
lines changed
app/code/Magento/Theme/view/frontend/templates/html Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Original file line number Diff line number Diff line change 11<?php
22/**
3- * Copyright © Magento, Inc. All rights reserved.
4- * See COPYING.txt for license details.
3+ * Copyright 2015 Adobe
4+ * All Rights Reserved.
5+ */
6+ /**
7+ * Escaper
8+ *
9+ * @var \Magento\Framework\Escaper
510 */
6-
711/**
812 * @var $block \Magento\Theme\Block\Html\Title
913 */
1014$ cssClass = $ block ->getCssClass () ? ' ' . $ block ->getCssClass () : '' ;
1115$ titleHtml = '' ;
12- if (trim ($ block ->getPageHeading ())) {
16+
17+ $ pageHeading = $ block ->getPageHeading () ? trim ($ block ->getPageHeading ()) : '' ;
18+
19+ if ($ pageHeading ) {
1320 $ titleHtml = '<span class="base" data-ui-id="page-title-wrapper" '
1421 . $ block ->getAddBaseAttribute ()
1522 . '> '
16- . $ block ->escapeHtml ($ block -> getPageHeading () )
23+ . $ escaper ->escapeHtml ($ pageHeading )
1724 . '</span> ' ;
1825}
1926?>
20- <?php if ($ titleHtml ) : ?>
21- <div class="page-title-wrapper<?= $ block ->escapeHtmlAttr ($ cssClass ) ?> ">
27+
28+ <?php if ($ titleHtml ): ?>
29+ <div class="page-title-wrapper<?= $ escaper ->escapeHtmlAttr ($ cssClass ) ?> ">
2230 <h1 class="page-title"
23- <?php if ($ block ->getId ()) : ?> id="<?= $ block ->escapeHtmlAttr ($ block ->getId ()) ?> " <?php endif ; ?>
24- <?php if ($ block ->getAddBaseAttributeAria ()) : ?>
25- aria-labelledby="<?= $ block ->escapeHtmlAttr ($ block ->getAddBaseAttributeAria ()) ?> "
31+ <?php if ($ block ->getId ()): ?> id="<?= $ escaper ->escapeHtmlAttr ($ block ->getId ()) ?> " <?php endif ; ?>
32+ <?php if ($ block ->getAddBaseAttributeAria ()): ?>
33+ aria-labelledby="<?= $ escaper ->escapeHtmlAttr ($ block ->getAddBaseAttributeAria ()) ?> "
2634 <?php endif ; ?> >
2735 <?= /* @noEscape */ $ titleHtml ?>
2836 </h1>
You can’t perform that action at this time.
0 commit comments