PDA

View Full Version : Backslashes by Apostrophes in Profile Comments


Kyttias
01-16-2015, 11:03 AM
Apostrophes are always lead by a \, presumably for security reasons.
The slashes can be removed before display by going into class_messagetablehelper.php and changing this line in function getVisitorMessage:
$vmField->add(new Comment($vmessage->vmtext));
To:
$msg = stripslashes($vmessage->vmtext);
$vmField->add(new Comment($msg));

Micolai
11-13-2020, 07:10 PM
Do you have a fix for the slashes in bios?

Kyttias
11-28-2020, 01:49 PM
I already responded elsewhere, but to be clear, yes this does also effect profile bios, so--

Inside class_userprofile.php, around line 123, replace this:
$basicinfo = "<br><strong>Member Since:</strong> {$membersince}<br>
Gender: {$this->gender}<br>
Favorite Color: {$this->color}<br>
Nickname: {$this->nickname}<br>
Bio: {$this->bio}";
With this:
$str_bio = stripslashes($this->bio);
$basicinfo = "<br><strong>Member Since:</strong> {$membersince}<br>
Gender: {$this->gender}<br>
Favorite Color: {$this->color}<br>
Nickname: {$this->nickname}<br>
Bio: {$str_bio}";

Micolai
01-04-2021, 08:57 PM
Thank you very much!