Fix unescaped quotes in dispatchEvent.
Merge pull request #990 from Sophist-UK/sophist_fix_unescaped_quotes_in_dispatchEvent

Sophist fix unescaped quotes in dispatchEvent