DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • April 26, 2019, 08:48:07 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Resource Pages

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


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
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

Running for more than three years now:
« 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.
Pages: [1]   Go Up
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!
Recent Topics
DragonPrime LoGD
Who's Online
23 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search