I don’t understand where you are getting the image from, is this entered into the link text? If it is something is transforming the html. I don’t know what that is.
try dumping the value and see if the HTML is altered before you add the link.
echo '<pre>'; var_dump($button_buy); echo '</pre>';