DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • August 27, 2016, 01:26:57 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: rawurlencode-decode-htmlentities  (Read 1990 times)
0 Members and 1 Guest are viewing this topic.
Nightborn
Guest
« on: September 19, 2005, 01:15:49 PM »

hmm.well.

translationwizrad  Grin

I have a problem...

I grab a intext from a row, rawurlencode it into a link.

If I want to delete this row now via an sql query, I would need rawurldecode and then add the string to a query.

but well.... it works good with ' and so on, because it adds the slashes.

but if the intext is "`#•`7 %s`n `% Abigail 'kills' you" then there is a problem. It does not duplicate the % for the query, and the query doesn't work.
(i.e. delete)

how can I fix that? if I pass it over via textarea boxes, I just htmlentities(stripslashes) it and can pass it over. it works.

but directly...well..problem s.

does anybody know a solution?

example: `% hello 'kitty' becomes `% hello \'kitty\'
 after the decode
but how can I get `%% hello \'kitty\' after the rawurlencode???
« Last Edit: September 19, 2005, 01:44:30 PM by Nightborn » Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #1 on: September 19, 2005, 09:23:30 PM »

$intext = str_replace("%", "%%", $intext);

This way? Just duplicate any occurences for "%" Wink
Logged

Running for more than three years now:
Nightborn
Guest
« Reply #2 on: September 19, 2005, 11:28:55 PM »

Yes, obviously...

Are there any other occurences that encode/decode doesn't hit? Any other characters Sad I want this thing to work.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

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