X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F02_dom%2F09_XHTMLParser.js;h=18cdc3799bfefc95f8fb8fcc847511348230971c;hb=HEAD;hp=764ce5f3c97c9145cf3a244fd029b3218078a245;hpb=eedd028ba64be2ea0828cf686f1d0ec3bb4010d5;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/02_dom/09_XHTMLParser.js b/0.6.x/js/02_dom/09_XHTMLParser.js index 764ce5f..18cdc37 100644 --- a/0.6.x/js/02_dom/09_XHTMLParser.js +++ b/0.6.x/js/02_dom/09_XHTMLParser.js @@ -20,7 +20,7 @@ var X_HTMLParser_CHARS = { X_HTMLParser_block = {'ADDRESS':1,'APPLET':1,'BLOCKQUOTE':1,'BUTTON':1,'CENTER':1,'DD':1,'DEL':1,'DIR':1,'DIV':1,'DL':1,'DT':1,'FIELDSET':1,'FORM':1,'FRAMESET':1,'HR':1,'IFRAME':1,'INS':1, 'ISINDEX':1,'LI':1,'MAP':1,'MENU':1,'NOFRAMES':1,'NOSCRIPT':1,'OBJECT':1,'OL':1,'P':1,'PRE':1,'SCRIPT':1,'TABLE':1,'TBODY':1,'TD':1,'TFOOT':1,'TH':1,'THEAD':1,'TR':1,'UL':1 }, // Inline Elements - HTML 4.01 - X_HTMLParser_inline = {'A':1,'ABBR':1,'ACRONYM':1,'APPLET':1,'B':1,'BASEFONT':1,'BDO':1,'BIG':1,'BR':1,'BUTTON':1,'CITE':1,'CODE':1,'DEL':1,'DFN':1,'EM':1,'FONT':1,'I':1,'IFRAME':1,'IMG':1, + X_HTMLParser_inline = {/*'A':1,*/'ABBR':1,'ACRONYM':1,'APPLET':1,'B':1,'BASEFONT':1,'BDO':1,'BIG':1,'BR':1,'BUTTON':1,'CITE':1,'CODE':1,'DEL':1,'DFN':1,'EM':1,'FONT':1,'I':1,'IFRAME':1,'IMG':1, 'INPUT':1,'INS':1,'KBD':1,'LABEL':1,'MAP':1,'OBJECT':1,'Q':1,'S':1,'SAMP':1,'SCRIPT':1,'SELECT':1,'SMALL':1,'SPAN':1,'STRIKE':1,'STRONG':1,'SUB':1,'SUP':1,'TEXTAREA':1,'TT':1,'U':1,'VAR':1}, // Elements that you can,' intentionally,' leave open // (and which close themselves) @@ -59,12 +59,12 @@ var X_HTMLParser_CHARS = { lastHtml = html, chars, last, text, index; - while ( html ) { + while( html ){ chars = true; last = stack[ stack.length - 1 ]; // Make sure we're not in a script or style element - if ( last && special[ handler.isXML ? last.toUpperCase() : last ] === 1 ) { + if( last && special[ handler.isXML ? last.toUpperCase() : last ] === 1 ){ if( 0 <= ( index = html.toUpperCase().indexOf( '") ) ) { + if( html.indexOf("") ) ){ handler.comment( html.substring( 4, index ) ); html = html.substring( index + 3 ); chars = false; }; // end tag - } else if ( html.indexOf("' || ( empty = html.substr( i, 2 ) === '/>' ) ) && + ( ( phase = 9 ) && ( attrs[ attrs.length ] = html.substring( start, i ) ) ); break; case 5 : // 属性の = または次の属性または htmlタグの閉じ - ( whiteSpace[ chr ] & 16 ) ?// ie4 未対応の属性には cite = http:// となる - 1 : + !( whiteSpace[ chr ] & 16 ) &&// ie4 未対応の属性には cite = http:// となる + // 1 : ( alphabets[ chr ] & 3 ) ? - ( ( phase = 4 ) && ( attrs[ attrs.length ] = attrName ) && ( start = i ) ) : + ( ( phase = 3 ) && ( attrs[ attrs.length ] = attrName ) && ( start = i ) ) : //