Encode all JS character escape sequences

Thanks once again to @michaelficarra