2
This is untested, but it should work.
class/module.textsanitizer.php
$patterns[] = "/[img align=(['"]?)(left|center|right)\1]([^"()?&'<>]*)[/img]/sU";
$patterns[] = "/[img]([^"()?&'<>]*)[/img]/sU";
$patterns[] = "/[img align=(['"]?)(left|center|right)\1 id=(['"]?)([0-9]*)\3]([^"()?&'<>]*)[/img]/sU";
$patterns[] = "/[img id=(['"]?)([0-9]*)\1]([^"()?&'<>]*)[/img]/sU";
Change each "/sU" to "/isU".
Note that once you make this change, you'll be stuck with having to re-apply it every time you upgrade Xoops. (Unless it gets incorporated as a feature.)