#9194 closed defect (bug) (fixed)
HTML emails show HTML anchor tag for Privacy Policy instead of rendering the HTML anchor tag
Reported by: | emaralive | Owned by: | imath |
---|---|---|---|
Milestone: | 14.0.0 | Priority: | normal |
Severity: | normal | Version: | 12.5.1 |
Component: | Templates | Keywords: | has-screenshots has-patch dev-feedback commit |
Cc: |
Description
This is a regression introduced in BuddyPress 12.4.1
and applies to both Legacy and Nouveau template packs whereby the Private Policy link is shown as the HTML anchor element instead of being rendered, see screenshot - screenshot-win10-me-2024.06.18-09_08_31.png.
The easiest way to replicate (see) the issue is to:
- Have a published "Private Policy" page.
- Go to
site.url/wp-admin/edit.php?post_type=bp-email
- Mouseover any Email template to expose the "visit" link then click visit.
You should see something similar to the aforementioned screenshot.
This issue is with the use of the esc_html()
function which converts the < (less than) and > (greater than) characters into their respective HTML entities, e.g., < and >, and can be found on Line 218 of src/bp-templates/bp-nouveau/buddypress/assets/emails/single-bp-email.php
and Line 218 of src/bp-templates/bp-legacy/buddypress/assets/emails/single-bp-email.php
.
The patch replaces the esc_html()
function with the wp_kses()
function and fixes the issue, see screenshot - screenshot-win10-me-2024.06.18-11_26_33.png.
screenshot-win10-me-2024.06.18-09_08_31.png