Allow javascript messages to be rendered

From what was discussed in https://github.com/joomla/joomla-cms/pull/3389
Merge pull request #18 from wilsonge/patch-1

Allow javascript messages to be rendered