Fossil

Check-in [5b2c8373]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:merge from trunk
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | wolfgangFormat2CSS_2
Files: files | file ages | folders
SHA1:5b2c83733628707e5318f24ed18fccf17e3f48b8
User & Date: wolfgang 2010-09-26 11:34:17
Original User & Date: Ratte 2010-09-26 11:34:17
References
2010-09-26
13:23 Ticket [8e291053] Color picker (edit check-in properties) status still Open with 1 other change artifact: e21aad27 user: Ratte
11:38 Ticket [8e291053]: 1 change artifact: 1b9521c6 user: Ratte
Context
2010-09-26
12:25
some more htm validation check-in: e5bf291e user: wolfgang tags: wolfgangFormat2CSS_2
11:34
merge from trunk check-in: 5b2c8373 user: wolfgang tags: wolfgangFormat2CSS_2
11:32
code layout optimoied for user color input and standard style comment for use of jscolor.com.. check-in: 87e27419 user: wolfgang tags: wolfgangFormat2CSS_2
11:11
Increased robustness of the XML markup parser. Ticket [675aaa3458199c8832c6879b43325ffb2fd62e75] check-in: ee78a381 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/wikiformat.c.

   377    377   */
   378    378   static int wikiUsesHtml(void){
   379    379     static int r = -1;
   380    380     if( r<0 ) r = db_get_boolean("wiki-use-html", 0);
   381    381     return r;
   382    382   }
   383    383   
   384         -
   385    384   /*
   386    385   ** z points to a "<" character.  Check to see if this is the start of
   387    386   ** a valid markup.  If it is, return the total number of characters in
   388    387   ** the markup including the initial "<" and the terminating ">".  If
   389    388   ** it is not well-formed markup, return 0.
   390    389   */
   391    390   static int markupLength(const char *z){
   392    391     int n = 1;
   393    392     int inparen = 0;
   394    393     int c;
   395    394     if( z[n]=='/' ){ n++; }
   396    395     if( !isalpha(z[n]) ) return 0;
   397    396     while( isalnum(z[n]) ){ n++; }
   398         -  if( (c = z[n])!='>' && !isspace(c) ) return 0;
          397  +  c = z[n];
          398  +  if( c=='/' && z[n+1]=='>' ){ return n+2; }
          399  +  if( c!='>' && !isspace(c) ) return 0;
   399    400     while( (c = z[n])!=0 && (c!='>' || inparen) ){
   400    401       if( c==inparen ){
   401    402         inparen = 0;
   402         -    }else if( c=='"' || c=='\'' ){
          403  +    }else if( inparen==0 && (c=='"' || c=='\'') ){
   403    404         inparen = c;
   404    405       }
   405    406       n++;
   406    407     }
   407    408     if( z[n]!='>' ) return 0;
   408    409     return n+1;
   409    410   }