This cleaning is being done in lib/weblib.php at line 1240 because of the forceclean function. I understand that this clean process is for the good of us all but these base64 images were created by users dragging and dropping images into their course which is just basic Moodle functionality. We were on Moodle 3.5.1 for quite a while and have moved to 3.7.1 and this breaks a ton of stuff. I'd consider this a Moodle bug since it should make an exception for a html which contains an image src plus data:image. Am I wrong?