Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Projects > The Bug Tracker > Bug

"rn" being deleted Issue Tools
issueid=56 04-20-2016 09:14 PM
"rn" being deleted
The format function is stripping out "rn" from words.

The format function is stripping out "rn" causing words like "learn" to be displayed as "lea". Obviously, that's super annoying. I believe the original intention was to remove new line artifacts from text.

This is the problematic function:
    private function format($text){
         $text = html_entity_decode($text);
         $text = stripslashes($text);
         $text = str_replace("rn","",$text);
         return $text;
Another issue with this is that it's repeated in four different files, more if you use mods like the news add on. So I suggest downloading an editor like Sublime Text 3, opening the folder with your site and using "Find in Files" to find all instances so it can be fixed. For the easiest fix I suggest simply deleting the line:
$text = str_replace("rn","",$text);

So far I haven't noticed excess "rn"s anyway. But if you're afraid of that, here's a corrected function that will strip new lines without stripping the letters "rn" from words.
    private function format($text){
         $text = html_entity_decode($text);
         $text = str_replace("\r\n","",$text);
         $text = stripslashes($text);
         return $text;
In the base script you can find this function in the following files:
Issue Details
Project The Bug Tracker
Category Unknown
Status Fixed
Priority 10 - Lowest
Affected Version Mys v1.3.4
Fixed Version Mys v1.3.5
Users able to reproduce bug 1
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)

04-22-2016 09:23 PM
A Headache Embodied
*tosses confetti into the air*

Amazing! I have been dying for a fix for this for ages now, I am absolutely delighted that someone found one!
04-22-2016 11:38 PM
Ahh thank you! <3
08-17-2020 11:30 PM
Issue Changed by Hall of Famer
  • Status changed from Unconfirmed to Fixed
08-17-2020 11:32 PM
Administrator, Lead Coder
This has been fixed and will not occur again in Mys v1.3.5. For users on older versions, just use RestlessThoughts' solution then.

Issue Tools
Subscribe to this issue

All times are GMT -5. The time now is 01:36 AM.

Currently Active Users: 359 (0 members and 359 guests)
Threads: 4,049, Posts: 31,828, Members: 15,723
Welcome to our newest members, Cas.

What's New?

What's Hot?

What's Popular?

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636