Search code examples
phpurlcodeigniterimagemagickspecial-characters

CodeIgniter URLs - replacing ( with (


I'm writing method that creates image file from URI segments. The problem is that when i type http://example.com/class/method/value1/value2/value ( 3 )/value4

And after imagemagick processing, the image is:

Value1
Value2
Value ( 3 )
Value4

I get data in that way: $this->data = addslashes(urldecode($data));

Also then I manually change code for generating image to

$image->annotateImage($draw, 20, 20, 0, "value ( 3 )");

It's fine.


Solution

  • html_entity_decode(urldecode($data));
    

    that done the dirty work for me. :)