To help finding the test case, can you please explain a bit when that code is inserted? In relation to what events (e.g. copy and paste, style change, etc)?

That's the code that loads the editor contents in the editing area (when creating an editor or switching back from source view). It not only loads it, but also removes the <script> tag (which seems to not happen in your case).

I think that we really need a testcase here. The patch just hides the script from the final output, but if it exist it means that there has been some error executing the contentDomReady function as cleaning the script is one of the first steps executed, and there might be other strange problems that we are not aware of if this symptom is hidden.

I agree with you Alfonso, but considering that we don't have a TC, it's a pity to miss this small change, which will at least prevent having one of the possible issues related to the execution error. After all, the change fixes "exactly" what's reported here. We may have other tickets for the other symptoms of it.