Skip to content

Commit

Permalink
add @wp/decodeEntities and use to ensure site title is properly decoded
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Jan 17, 2024
1 parent 8dceca4 commit d7e8a51
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
22 changes: 22 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@testing-library/cypress": "^10.0.1",
"@wordpress/env": "^9.1.0",
"@wordpress/eslint-plugin": "^17.6.0",
"@wordpress/html-entities": "^3.49.0",
"@wordpress/scripts": "^26.19.0",
"cypress": "^13.6.2",
"cypress-axe": "^1.5.0",
Expand Down
3 changes: 2 additions & 1 deletion src/app/components/site-info/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { LockClosedIcon, LockOpenIcon } from '@heroicons/react/24/outline';
import { decodeEntities } from '@wordpress/html-entities';
import { NewfoldRuntime } from '@newfold-labs/wp-module-runtime';
import { Button } from '@newfold/ui-component-library';
import { BluehostIcon, WordPressIcon } from '../icons';
Expand Down Expand Up @@ -29,7 +30,7 @@ export const SiteInfoBar = () => {
<div className="nfd-flex nfd-justify-between nfd-items-center nfd-flex-wrap nfd-gap-4">
<div className="nfd-w-max nfd-flex nfd-flex-col nfd-gap-1.5">
<h3 className="nfd-text-white nfd-text-2xl nfd-font-semibold">
{ title }
{ decodeEntities( title ) }
</h3>
<div className="nfd-flex nfd-items-center nfd-gap-3 nfd-font-medium">
<div className="nfd-flex nfd-items-center nfd-gap-1">
Expand Down

0 comments on commit d7e8a51

Please sign in to comment.