I've got a variable which contains a string which can contain html.
I'm trying to find a way to check the string if it contains a <img>-tag, and if so..validate that it has a valid file.exstension. (jpg | png | gif).
If an img tag is located and HAS a valid extension, then display it as usual, if it doesn't have a valid extension (for example just linking to another html page or whatever) do not parse it...
We have a few functions on our site which are linked towards pageviews of certain pages..and this can currently be exploited by just linking an img tag to this certain page.