How can I strip attributes from a html image string and only keep the source?
I have lots of html image elements as a string but they often contain rubbish I don't need. How can I remove titles, height, class etc? Eg. <img class="img-fruit" src="apple.png" title="apple" height="25" width="25"> Would become <img src="apple.png"> The order of…