From 6376a8f6f734fa06b61077c2543224fdf1cf0282 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Wed, 29 Jan 2025 21:35:19 +0000 Subject: [PATCH] Privacy: Replace Policy Name with an auto increment to avoid internationalized plugin name issues. This changeset replaces plugin sanitized names with an auto increment integer to fix an issue with accordions displaying privacy policies for plugins with special characters in their names. Follow-up to [50161]. Props ecgan, sabernhardt, audrasjb. Fixes #62713. Built from https://develop.svn.wordpress.org/trunk@59732 git-svn-id: http://core.svn.wordpress.org/trunk@59074 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-privacy-policy-content.php | 10 ++++++---- wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/wp-admin/includes/class-wp-privacy-policy-content.php b/wp-admin/includes/class-wp-privacy-policy-content.php index 724a0dcf64..78669c7351 100644 --- a/wp-admin/includes/class-wp-privacy-policy-content.php +++ b/wp-admin/includes/class-wp-privacy-policy-content.php @@ -381,7 +381,11 @@ final class WP_Privacy_Policy_Content { $content = ''; $date_format = __( 'F j, Y' ); + $i = 0; + foreach ( $content_array as $section ) { + ++$i; + $class = ''; $meta = ''; $removed = ''; @@ -409,11 +413,9 @@ final class WP_Privacy_Policy_Content { } $plugin_name = esc_html( $section['plugin_name'] ); - - $sanitized_policy_name = sanitize_title_with_dashes( $plugin_name ); ?>

-

-