View Full Version : 'rn' in text boxes.
Nieth
06-07-2013, 08:49 AM
I've noticed that the website script does not take kindly to the the letters 'rn' being together in that order, especially on the ToS page.
I have often tried to edit the page, but every time I do those two letter vanish when they are placed in that order right next to eachother.
This can be checked by trying to type in 'warning' or 'alternative' into the rules page. When you hit submit and then go to view the page, the words will be 'waing' and 'alteative.'
Tequila
06-07-2013, 09:28 AM
A quick google search pulled this up:
http://www.tinymce.com/forum/viewtopic.php?id=12092
This is a bug but i created some cheat in php... Basically, /r/n is "new line" in html that can be read by tinymce, and some hosting company uses "addslashes" function to resolve sql injection...
In order to remove those slashes, you need to use "stripslashes", but it will also remove the slashes in "/r/n" so it will produce the string "rn". Therefore, that "rn" will appear as text in tinymce... (i used this also in <img> slashes problem)
To resolve that, you just have to add "replace_str" before sending it to database (replace 'rn' with '')....
like this >>>
stripslashes(str_replace('\r\n', '', mysql_real_escape_string($post['description'])))
hope this help... it works with me....
Last edited by rexjaysoncortez (2010-12-19 16:31:42)
Just have to add that code in. I'll let Hoffie know that this bug is still going...
Nieth
06-07-2013, 09:35 AM
Alright, but I'm rather new to all of this, where would I put that string of code?
Tequila
06-07-2013, 01:30 PM
I'm not sure...
I'd say somewhere in the same folder as the tinymce program. If that doesn't work we'll have to keep trying...
Nieth
06-07-2013, 02:38 PM
There's a tinymce program in Mysidia..?
Tequila
06-07-2013, 09:06 PM
It's either TinyMCE or one of the other editors... I can't remember which off hand (not running my adopts site any more, just hanging around designing themes)...
Nieth
06-07-2013, 09:57 PM
Alright. I'm sorry to be nosy, but do you know if HoF's alright? I haven't seen him posting much lately.
Hall of Famer
06-10-2013, 06:50 PM
The reason why I made 'rn' impossible to be used in the script is that it messes up with empty spaces and new lines. I will see if theres a better solution though.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.