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 1
1
<?php
2
2
/**
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
5
10
*/
6
-
7
11
/**
8
12
* @var $block \Magento\Theme\Block\Html\Title
9
13
*/
10
14
$ cssClass = $ block ->getCssClass () ? ' ' . $ block ->getCssClass () : '' ;
11
15
$ titleHtml = '' ;
12
- if (trim ($ block ->getPageHeading ())) {
16
+
17
+ $ pageHeading = $ block ->getPageHeading () ? trim ($ block ->getPageHeading ()) : '' ;
18
+
19
+ if ($ pageHeading ) {
13
20
$ titleHtml = '<span class="base" data-ui-id="page-title-wrapper" '
14
21
. $ block ->getAddBaseAttribute ()
15
22
. '> '
16
- . $ block ->escapeHtml ($ block -> getPageHeading () )
23
+ . $ escaper ->escapeHtml ($ pageHeading )
17
24
. '</span> ' ;
18
25
}
19
26
?>
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 ) ?> ">
22
30
<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 ()) ?> "
26
34
<?php endif ; ?> >
27
35
<?= /* @noEscape */ $ titleHtml ?>
28
36
</h1>
You can’t perform that action at this time.
0 commit comments