2
I would suggest that you check the following places.
/include/xoopscodes.php is where you will find the code for the text editor.
/class/module.textsanitizer.php is where you find the function you have asked for.
If you really want to modify this area, then I suggest you use formclass and do not use the depreciated code (like makeTareaData4Save) in your modules.