[wp-trac] [WordPress Trac] #64748: Privacy: get_the_privacy_policy_link() should strip HTML tags and return plain text
WordPress Trac
noreply at wordpress.org
Sat Feb 28 06:42:14 UTC 2026
#64748: Privacy: get_the_privacy_policy_link() should strip HTML tags and return
plain text
--------------------------+---------------------
Reporter: wildworks | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 7.0
Component: Privacy | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+---------------------
Comment (by ozgursar):
== Patch Testing Report
Patch Tested: https://github.com/WordPress/wordpress-develop/pull/11088
=== Environment
- WordPress: 7.0-beta2-61752-src
- PHP: 8.2.29
- Server: nginx/1.29.4
- Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
- Browser: Chrome 145.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.4
- MU Plugins: None activated
- Plugins:
* Test Reports 1.2.1
=== Steps taken
1. On the pages list, use `Quick Edit` to change Privacy Policy page's
title to `<strong><em>Privacy Policy</em></strong>` and Publish.
2. View the Login page. Escaped HTML tags are visible.
3. Apply the patch
4. View the Login page again. HTML tags are applied to the link.
x. ✅ Patch is solving the problem
=== Expected result
- If the HTML formatting is intentional and expected then it should render
as a part of page title. `wp_kses_post()` provides this flexibility.
=== Screenshots/Screencast with results
Before
[[Image(https://i.imgur.com/GkpLxeN.png)]]
After
[[Image(https://i.imgur.com/05EGSL9.png)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64748#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list