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 probelm might occur in xml autocomplete.