DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • July 31, 2010, 03:50:44 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: The ever so annoying, " \' ".  (Read 1408 times)
0 Members and 1 Guest are viewing this topic.
Dhampir
Guest
« on: July 23, 2005, 07:59:02 AM »

I'm sure most of you, or your player base have attempted to put apostrophes into either their/your name, in bios...in pet names, weapon names, all of these things, with the same result. ==  \' or something like that instead of just an ' .

Also, if you were to put it into a name, that interferes with the PHP, and you can no longer access that person's bio.

Now, what I did for my server, was make the code, "`a" come out as an apostrophe by doing this in output.php:

Code:
case "a":
$out.="'";
break;

And obviously adding, "a" to lib/sanitize.php.

"'" for those of you who don't know, it is the entity apos, which is just a code for the character  ' or and apostrophe. By doing this...it's not adding an ' into it directly, its entering ' which is the samething..but kinda not.

Like I mentioned earlier, ' interferes with the PHP anytime you add it to anything, besides when you use it in like the village..which is because it's not interfering with any script.

My suggestion, for the core. Is to somehow adopt a method, so that if you enter, ' into anything, somehow it changes that into an ' so it won't interfere with code.

I'm pretty sure something like this is possible. Though, I lack the skillz to think of some way to implement this, but either way I thought I might like to share this with you fellow modders, and even the creators...because all of you have way more knowledge at something like this than me.

Thanks for looking over this,

-Dhampir
Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5207



View Profile WWW
« Reply #1 on: July 23, 2005, 11:56:40 AM »

What affect would that have on name filters when you're trying to find a specific player's name?
Logged

Play the latest beta version here on DragonPrime
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #2 on: July 23, 2005, 12:04:04 PM »

Umm... you could always use addslashes() and stripslashes()... Roll Eyes Those aren't beyond ANYONE's skill(z).

As well, I have no trouble inserting apostrophes into anyone's name or bio... if you look on my site, there is one shining example: Selekta's Little Slave Girl... and, I can still view her bio.

So, I really have no idea what you are trying to get at... but there is nothing that needs to change within core.
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

R4000
Guest
« Reply #3 on: July 23, 2005, 12:48:01 PM »

I have had this too... mostly on modules that display the name without doing stripslashes().

Sichae is correct by saying its a simple stripslashes required.... (Not beyond my b3r 7331 5k1175!i!i!i!i!)
Logged
Dhampir
Guest
« Reply #4 on: July 23, 2005, 01:03:55 PM »

Talisman, are you meaning like, in the "List Warrior/User Editor" pages, and typing in someone's name to find them? If so, then no it doesn't. It's really no different that adding a color/bold/italic to someones name.

If you're not, so I missed what you meant.

Umm... you could always use addslashes() and stripslashes()... Roll Eyes Those aren't beyond ANYONE's skill(z).

Again, something I must've missed. Could you explain that?

And, by accessing the bio, I obviously mean that, by clicking the name of the person with the normal, ', you'd get a parse error on all the servers i've played.

And of course I'm not saying that anything is WRONG with the core code, just merely suggesting something that might be a plus, if it were implemented.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Who's Online
22 Guests, 1 User
spector
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search