kat32 Posted March 13, 2009 Share Posted March 13, 2009 I don't want to use the function htmlspecialchars/ htmlentites when the users input <img> tag with attributes. please help. Quote Link to comment https://forums.phpfreaks.com/topic/149238-htmlspecialchars/ Share on other sites More sharing options...
JonnoTheDev Posted March 13, 2009 Share Posted March 13, 2009 Then simply dont use the function htmlentites() or htmlspecialchars() Quote Link to comment https://forums.phpfreaks.com/topic/149238-htmlspecialchars/#findComment-783693 Share on other sites More sharing options...
kat32 Posted March 13, 2009 Author Share Posted March 13, 2009 I mean I don't want to use the function htmlspecialchars/ htmlentites when the users input <img> tag with attributes. Quote Link to comment https://forums.phpfreaks.com/topic/149238-htmlspecialchars/#findComment-783694 Share on other sites More sharing options...
jcombs_31 Posted March 13, 2009 Share Posted March 13, 2009 I mean I don't want to use the function htmlspecialchars/ htmlentites when the users input <img> tag with attributes. Did you really just copy and paste from your first post? What exactly is it that you want to do? You said what you don't want, so as neil said, just don't. You'll have to elaborate. Quote Link to comment https://forums.phpfreaks.com/topic/149238-htmlspecialchars/#findComment-783699 Share on other sites More sharing options...
JonnoTheDev Posted March 13, 2009 Share Posted March 13, 2009 Then don't!. What is the problem, you are not making it very clear. Quote Link to comment https://forums.phpfreaks.com/topic/149238-htmlspecialchars/#findComment-783700 Share on other sites More sharing options...
jackpf Posted March 13, 2009 Share Posted March 13, 2009 I think...and I'm contemplating here...that he wants to use htmlspecialchars(), but not on <img> tags. In which case...you'll have to make some bbcode type funtion. If that's not what you mean than...learn to speak properly. Quote Link to comment https://forums.phpfreaks.com/topic/149238-htmlspecialchars/#findComment-783707 Share on other sites More sharing options...
kat32 Posted March 13, 2009 Author Share Posted March 13, 2009 Sorry I've edited my first post. jackpf is correct, I want to use htmlspecialchars(), but not on <img> tags. In other tags like <a href="index.php">link</a> , it will not show link Quote Link to comment https://forums.phpfreaks.com/topic/149238-htmlspecialchars/#findComment-784213 Share on other sites More sharing options...
jackpf Posted March 14, 2009 Share Posted March 14, 2009 Yeah, it's probably best to use bbcode or something of the sort... Have a look at preg_replace() and regex. Quote Link to comment https://forums.phpfreaks.com/topic/149238-htmlspecialchars/#findComment-784358 Share on other sites More sharing options...
kat32 Posted March 24, 2009 Author Share Posted March 24, 2009 thank you Quote Link to comment https://forums.phpfreaks.com/topic/149238-htmlspecialchars/#findComment-792583 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.