During Huang Chao 's rebellion against Emperor Xizong , Zhang surrendered to Huang Chao 's Qi state .
During Huang Chao 's rebellion against Emperor Xizong , Zhang plotted to undermine it ; when this was discovered , Qi executed him .
During Huang Chao 's rebellion against Emperor Xizong , Zhang surrendered to Huang Chao 's Qi state but plotted to undermine it ; when this was discovered , Qi executed him .