Fix for inline scripts that contain non-latin characters.