Skip to content

Commit

Permalink
Fix special chars display in SMP (#39756)
Browse files Browse the repository at this point in the history
* Fix special chars display in SMP

The Site Management Panel may break when special chars are included in the blog's name (quotes, ampersands, etc.). This commit fixes that.

* Add ENT_QUOTES

* Changelog

* Use wp_specialchars_decode instead
  • Loading branch information
bor0 authored Oct 24, 2024
1 parent 7367cf0 commit 853940e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Site Management Panel: fix site name encoding display
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function enqueue_wpcom_dashboard_widgets() {

$data = wp_json_encode(
array(
'siteName' => get_bloginfo( 'name' ),
'siteName' => wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ),
'siteDomain' => wp_parse_url( home_url(), PHP_URL_HOST ),
'siteIconUrl' => get_site_icon_url( 38 ),
)
Expand Down

0 comments on commit 853940e

Please sign in to comment.