Script Code in Text Widget Does NOT Show

[SUMMARY]

Although in theory, using the core provided Text Widget should allow you to put any arbitrary HTML code into action, I recently encountered the issue above where the code was wrapped by WordPress in such a way that affected the ability to render properly on Chrome. The code still showed up fine on Firefox and Internet Explorer but the problem affected Chrome sufficiently that it would not display correctly (would show up blank/no output rendering).

[SOLUTION]

After looking at the core code and evaluating the “final” code that WordPress is pushing out, I realized that it has to do with the way it affects the element’s generated by code from being accessed by the Chrome mechanism for rendering. Removing those added wrappings that caused the issue from the final code resulted in displaying correctly. This process was further automated and verified repeatedly by using a plugin suggested by @toscho called Magic Widgets that provides you with an Unfiltered Text Widget that processes the code pasted in them in their pure form and without and processing or wrapping done by WordPress.

[CONCLUSION]

My conclusion and recommendation to everyone is that until such time as I can get the WordPress developers to provide a better Text Widget that doesn’t interact with the code in anyway, you should use the above mentioned Plugin for putting any raw codes, particularly <SCRIPT> codes or anything that pulls JavaScript code from the system (like the above example in my question) so that you avoid any interference with the way it is processed and rendered by WordPress – short of editing the pages manually and putting your code directly in the files you will be displaying.