I have been successfully using a homemade article including a form and some javascript for a while now on Joomla 3 which also uses the Regularlabs Sourcerer plugin.
Turns out that I recently migrated this article to Joomla 4.1.1 (so far) as part of my website upgrade attempt and the script breaks.
Looking into what was saved, I figured that the select "onChange" element was transformed into "on-change"!
I then tried with a basic minimum code indicated below (nothing fancy) and here's what came out after save:
<select name="optone" size="1" id="optone" on-Change="javascript:setOptions(this.value)">
<option value="0">Choose a type</option>
<option value="1">Sports</option>
<option value="2">Educational</option>
</select>
I have tried to see if this could come from the editor I use, switching from JCE to TinyMCE, with no luck.
Could this be looking like a Joomla 4 "uncommented feature"?