Skip to:
Content

BuddyPress.org

Changeset 13933


Ignore:
Timestamp:
06/22/2024 08:20:23 AM (5 months ago)
Author:
imath
Message:

Email template footer: use an escape function allowing to output links

Props emaralive

See #9194 (trunk)

Location:
trunk/src/bp-templates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/assets/emails/single-bp-email.php

    r13822 r13933  
    216216                        ?>
    217217
    218                         <span class="footer_text"><?php echo nl2br( esc_html( stripslashes( $settings['footer_text'] ) ) ); ?></span>
     218                        <span class="footer_text"><?php echo nl2br( wp_kses( stripslashes( $settings['footer_text'] ), array( 'a' => array( 'href' => true ) ) ) ); ?></span>
    219219                        <br><br>
    220220                        <a href="{{{unsubscribe}}}" style="text-decoration: underline;"><?php echo esc_html_x( 'unsubscribe', 'email', 'buddypress' ); ?></a>
  • trunk/src/bp-templates/bp-nouveau/buddypress/assets/emails/single-bp-email.php

    r13820 r13933  
    216216                        ?>
    217217
    218                         <span class="footer_text"><?php echo nl2br( esc_html( stripslashes( $settings['footer_text'] ) ) ); ?></span>
     218                        <span class="footer_text"><?php echo nl2br( wp_kses( stripslashes( $settings['footer_text'] ), array( 'a' => array( 'href' => true ) ) ) ); ?></span>
    219219                        <br><br>
    220220                        <a href="{{{unsubscribe}}}" style="text-decoration: underline;"><?php echo esc_html_x( 'unsubscribe', 'email', 'buddypress' ); ?></a>
Note: See TracChangeset for help on using the changeset viewer.