Jump to content
Larry Ullman's Book Forums

Recommended Posts

Can you please tell me how to change this preg_match, which is trying to stop the html anchors. I think this has been working up until recently. Someone is placing links within the email. I also include one of the email that got through. Is it because the <a is on one line and the html is on the next line?

 

my code:

// check for html links and not permitted

if (preg_match('/<a\s/', $scrubbed['comments'])) {

echo '<p style="font-weight: bold; color: #C00">Not Permitted.</p>';

} else { // no html anchor

 

the email:

<p>hi!<br>for a while I wasnt feeling like myself this caught my eye right away its

crazy how the tables have turned check out what I mean<br><a

href="http://ansel.pl/GaryBailey15.html">http://ansel.pl/GaryBailey15.html</a><br>see

you later</p>

Link to comment
Share on other sites

 Share

×
×
  • Create New...