JS escaping loading statuses

This _could_ potentially cause JS injection issues, at the very least it
allows for the generation of errors so makes sense to fix.