Use inspect method to properly escape string when injected to javascript

Fixes the issue when the changelog has a newline in it. The newline confuses
javascript and does not work anymore.