xXREDXIIIXx Posted February 14, 2010 Share Posted February 14, 2010 Example file name = tag-'em.jpg I tried to use str_replace("'", "\'", $name); outputs <img src="http://www.example.com/tag-%5C" em-and-bag-\="" em.jpg=""> been googling for last hour or so I cant figure it out. Link to comment https://forums.phpfreaks.com/topic/192008-single-quote-in-img-src/ Share on other sites More sharing options...
BK87 Posted February 14, 2010 Share Posted February 14, 2010 Example file name = tag-'em.jpg I tried to use str_replace("'", "\'", $name); outputs <img src="http://www.example.com/tag-%5C" em-and-bag-\="" em.jpg=""> been googling for last hour or so I cant figure it out. show me the code that displays the link it self. Link to comment https://forums.phpfreaks.com/topic/192008-single-quote-in-img-src/#findComment-1012006 Share on other sites More sharing options...
xXREDXIIIXx Posted February 14, 2010 Author Share Posted February 14, 2010 just figured it out sorry str_replace("'", "%27", $name); Link to comment https://forums.phpfreaks.com/topic/192008-single-quote-in-img-src/#findComment-1012008 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.