سؤال

I'm using NicEdit with image upload option.
I'd tested my site on localhost and everything works well. But as I've uploaded it to the server it doesn't work.
I found the reason is that, it is adding \ to every ". And the tags I'm getting looks like:

<img src=\"http://someurl.com/image.jpg\">

How could I tackle with this problem?

هل كانت مفيدة؟

المحلول 2

I'd found the reason of such behavior.
I'm using addslashes($str) for avoiding user to enter any escape sequence. But I forgot to use stripslashes($str) for removing \.

نصائح أخرى

Faisal you can replace all \ with the "" (empty space). just use

private String replace(String Path){


        return Path.replaceAll("\\", "");

    }
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top