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

Changes to src/wikiformat.c.

377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397


398
399
400
401
402
403
404
405
406
407
408
409
*/
static int wikiUsesHtml(void){
  static int r = -1;
  if( r<0 ) r = db_get_boolean("wiki-use-html", 0);
  return r;
}


/*
** z points to a "<" character.  Check to see if this is the start of
** a valid markup.  If it is, return the total number of characters in
** the markup including the initial "<" and the terminating ">".  If
** it is not well-formed markup, return 0.
*/
static int markupLength(const char *z){
  int n = 1;
  int inparen = 0;
  int c;
  if( z[n]=='/' ){ n++; }
  if( !isalpha(z[n]) ) return 0;
  while( isalnum(z[n]) ){ n++; }


  if( (c = z[n])!='>' && !isspace(c) ) return 0;
  while( (c = z[n])!=0 && (c!='>' || inparen) ){
    if( c==inparen ){
      inparen = 0;
    }else if( c=='"' || c=='\'' ){
      inparen = c;
    }
    n++;
  }
  if( z[n]!='>' ) return 0;
  return n+1;
}







<













>
>
|



|







377
378
379
380
381
382
383

384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
*/
static int wikiUsesHtml(void){
  static int r = -1;
  if( r<0 ) r = db_get_boolean("wiki-use-html", 0);
  return r;
}


/*
** z points to a "<" character.  Check to see if this is the start of
** a valid markup.  If it is, return the total number of characters in
** the markup including the initial "<" and the terminating ">".  If
** it is not well-formed markup, return 0.
*/
static int markupLength(const char *z){
  int n = 1;
  int inparen = 0;
  int c;
  if( z[n]=='/' ){ n++; }
  if( !isalpha(z[n]) ) return 0;
  while( isalnum(z[n]) ){ n++; }
  c = z[n];
  if( c=='/' && z[n+1]=='>' ){ return n+2; }
  if( c!='>' && !isspace(c) ) return 0;
  while( (c = z[n])!=0 && (c!='>' || inparen) ){
    if( c==inparen ){
      inparen = 0;
    }else if( inparen==0 && (c=='"' || c=='\'') ){
      inparen = c;
    }
    n++;
  }
  if( z[n]!='>' ) return 0;
  return n+1;
}