I tried to add some JavaScript inside a custom field description and it worked well inside the custom field editor.
Still, it seems that Jira stripped my javascript from the description when it was displayed in the issue UI (as apposed to the admin area, where it did not).
So, I would say this is a bug, now the question is how to workaround this and have my code executed.