Update ResponseListener.php

Accept now text/javascript and trim format to not bug with space.