Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   'rn' in text boxes. (http://www.mysidiaadoptables.com/forum/showthread.php?t=4157)

Nieth 06-07-2013 08:49 AM

'rn' in text boxes.
 
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

Quote:

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.


All times are GMT -5. The time now is 08:24 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.