Wrong token if used with htmlmixed mode

It took the token of htmlmixed mode instead of the inner javascript mode, thus autocomplete was not fully functional. Same problem might occur in xml autocomplete.