Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!5629
Backport
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Backport
issue/drupal-3405345:3405345-ignore-patch-testing
into
10.2.x
Overview
0
Commits
1
Pipelines
1
Changes
42
Open
Tim Plunkett
requested to merge
issue/drupal-3405345:3405345-ignore-patch-testing
into
10.2.x
1 year ago
Overview
0
Commits
1
Pipelines
1
Changes
42
Expand
Closes
#3405345
0
0
Merge request reports
Compare
10.2.x
10.2.x (base)
and
latest version
latest version
8baafbdf
1 commit,
1 year ago
42 files
+
1049
−
213
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
42
Search (e.g. *.vue) (Ctrl+P)
core/includes/theme.inc
+
24
−
5
Options
@@ -1320,11 +1320,30 @@ function template_preprocess_html(&$variables) {
$variables
[
'page'
][
'#title'
]
=
(
string
)
\Drupal
::
service
(
'renderer'
)
->
render
(
$variables
[
'page'
][
'#title'
]);
}
if
(
!
empty
(
$variables
[
'page'
][
'#title'
]))
{
$head_title
=
[
// Marking the title as safe since it has had the tags stripped.
'title'
=>
Markup
::
create
(
trim
(
strip_tags
(
$variables
[
'page'
][
'#title'
]))),
'name'
=>
$site_config
->
get
(
'name'
),
];
$head_title
=
[];
// Marking the title as safe since it has had the tags stripped.
$head_title
[
'title'
]
=
Markup
::
create
(
trim
(
strip_tags
(
$variables
[
'page'
][
'#title'
])));
$maintenance_mode
=
defined
(
'MAINTENANCE_MODE'
)
||
\Drupal
::
state
()
->
get
(
'system.maintenance_mode'
);
if
(
!
$maintenance_mode
)
{
$base_route_title
=
\Drupal
::
service
(
'base_route_title_resolver'
)
->
getTitle
(
\Drupal
::
requestStack
()
->
getCurrentRequest
(),
\Drupal
::
routeMatch
()
->
getRouteObject
());
if
(
is_array
(
$base_route_title
))
{
$base_route_title
=
(
string
)
\Drupal
::
service
(
'renderer'
)
->
render
(
$base_route_title
);
}
if
(
$base_route_title
)
{
// Marking the title as safe since it has had the tags stripped.
$base_route_title
=
Markup
::
create
(
trim
(
strip_tags
(
$base_route_title
)));
// If the base route title is not the same as the current title, append it
// to the head title.
if
((
string
)
$base_route_title
!==
(
string
)
$head_title
[
'title'
])
{
$head_title
[
'base_route_title'
]
=
$base_route_title
;
}
}
}
$head_title
[
'name'
]
=
$site_config
->
get
(
'name'
);
}
// @todo Remove once views is not bypassing the view subscriber anymore.
// @see https://www.drupal.org/node/2068471
Loading