varattr=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;// Empty Elements - HTML 5
varempty=makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr');// Block Elements - HTML 5
// fixed by xxx 将 ins 标签从块级名单中移除
varblock=makeMap('a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video');// Inline Elements - HTML 5
varinline=makeMap('abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var');// Elements that you can, intentionally, leave open
// (and which close themselves)
varcloseSelf=makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr');// Attributes that have their values filled in disabled="disabled"
varfillAttrs=makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected');// Special Elements (can contain anything)
varspecial=makeMap('script,style');
functionHTMLParser(html,handler){
varindex;
varchars;
varmatch;
varstack=[];
varlast=html;
stack.last=function(){
returnthis[this.length-1];
};
while(html){
chars=true;// Make sure we're not in a script or style element