Skip to content

Commit

Permalink
Site Editor: Decode entities in the site title (#40956)
Browse files Browse the repository at this point in the history
* Site Editor: Decode entities in the site title
* Decode title argument
  • Loading branch information
Mamaduka authored May 10, 2022
1 parent 881767d commit 67c1b1c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/edit-site/src/components/routes/use-title.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useSelect } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';
import { __, sprintf } from '@wordpress/i18n';
import { speak } from '@wordpress/a11y';
import { decodeEntities } from '@wordpress/html-entities';

/**
* Internal dependencies
Expand Down Expand Up @@ -36,8 +37,8 @@ export default function useTitle( title ) {
const formattedTitle = sprintf(
/* translators: Admin screen title. 1: Admin screen name, 2: Network or site name. */
__( '%1$s ‹ %2$s — WordPress' ),
title,
siteTitle
decodeEntities( title ),
decodeEntities( siteTitle )
);

document.title = formattedTitle;
Expand Down

0 comments on commit 67c1b1c

Please sign in to comment.