Jump to content

Recommended Posts

Hello,

 

I have a funtion which I run on a string to convert characters to their html eqivalent like so:

 

$string = cleanInput("There's a big bad woolf"); //There& #38 ;s a big bad woolf

 

Now this works great, but say I had the string

 

$string = cleanInput("There's a big bad woolf here <a href=\"click.php\">here</a>"); 

 

That would convert the " to the html equavalent as well.  How could I get around this please and say anywhere there is a <a href> link use the cleanInput function but anywhere else in the text string do?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/204203-ignore-a-href-link-within-a-function/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.