Allow javascript messages to be rendered

From what was discussed in https://github.com/joomla/joomla-cms/pull/3389