I am importing the images from XML using a plugin, it truncates the image link while importing. Some symbols are causing the images not to show in the posts. This is the image link.
What it shows is mydomain.com/wp-content/uploads/2014/03/watermark.jpeg
I need a php function which escapes the special characters in a URL. (WordPress Plugin Name: WP-ALLIMPORT)
Leave a Reply
You must be logged in to post a comment.
Because based on your description, I am not sure what is your purpose doing the escape.
If you want to escape the URL, you might consider using WordPress internal esc_url() function
If you want to do some more low level control with PHP native function, you may consider urlencode() and you might have to manually urldecode() it in some cases depending on your purpose