Content

# BuddyPress.org

Opened 4 years ago

Closed 4 years ago

# Backslashes get lost in activity stream

Reported by: Owned by: antonv normal normal 2.4.0 Core reporter-feedback dcavins

### Description

Hi

1. in the bbpress forum I wrote following text:
a new bbPress test $a=b\cos\alpha$

1. but this gets displayed in the activity log as
a new bbPress test $a=bcosalpha$

1. However when I post the same (1.) in buddypress activity log, it is displayed correctly.

Looking into the the databases it becomes clear why
Text from bbPress Forum is stored in wp_bp_activity as

a new bbPress test $a=b\cos\alpha$


whereas text entered on the activity log is stored in wp_bp_activity as

a new ActivityLog test $a=b\\cos\\alpha$


although typed with only one \ and subsequently also rendered with a single backslash

Can you please issue an update, or tell me what file to modify and what, that correctly inserts the extra slashes to forums and comment activity so that the text copied from forum to the activity is rendered correctly in the buddyPress activity log.

(buddyPress version is 2.4.3)

### #1 @dcavins 4 years ago

Hi @antonv-

Backslashes are used in MySQL as an escape character. (See the section starting "Within a string, certain sequences have special meaning..." here for more information http://dev.mysql.com/doc/refman/5.7/en/string-literals.html)

It sounds like the updates from the bbPress forums added to the activity stream are not being escaped before being saved to the database. Which version of bbPress are you using?

### #2 @henry.wright 4 years ago

It sounds like the updates from the bbPress forums added to the activity stream are not being escaped before being saved to the database

If that's the case, it is worth pulling this ticket and discussing the rest in private?

### #3 @DJPaul 4 years ago

@antonv Which version of bbPress are you using?

### #4 @DJPaul 4 years ago

• Milestone Awaiting Review deleted
• Resolution set to invalid
• Status changed from new to closed

Closing due to no reporter feedback that we need to proceed.

### #5 @DJPaul 4 years ago

• Component changed from API to Core
Note: See TracTickets for help on using tickets.