[buddypress-trac] [BuddyPress Trac] #9194: HTML emails show HTML anchor tag for Privacy Policy instead of rendering the HTML anchor tag

buddypress-trac noreply at wordpress.org
Wed Jun 19 12:40:12 UTC 2024


#9194: HTML emails show HTML anchor tag for Privacy Policy instead of rendering
the HTML anchor tag
-------------------------+-------------------------------------------------
 Reporter:  emaralive    |      Owner:  (none)
     Type:  defect       |     Status:  new
  (bug)                  |
 Priority:  normal       |  Milestone:  12.6.0
Component:  Templates    |    Version:  12.5.1
 Severity:  normal       |   Keywords:  has-screenshots has-patch dev-
                         |  feedback
-------------------------+-------------------------------------------------
 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 [https://github.com/buddypress/buddypress/blob/master/src/bp-
 templates/bp-nouveau/buddypress/assets/emails/single-bp-
 email.php#L218C51-L218C59 Line 218] of **{{{src/bp-templates/bp-
 nouveau/buddypress/assets/emails/single-bp-email.php}}}** and
 [https://github.com/buddypress/buddypress/blob/master/src/bp-templates/bp-
 legacy/buddypress/assets/emails/single-bp-email.php#L218C51-L218C59 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.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9194>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list