Fossil

Check-in [71104b89]
Login

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

Overview
Comment:Bug fix in wiki rendering. Avoid terminating the output when an an unrecognized markup attribute appears inside <verbatim>.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 71104b898d05fe56419b9a600febe0cacca8a570
User & Date: drh 2008-06-08 16:19:14.000
Context
2008-06-08
19:31
Use cr/nl instead of just nl at the end of every line on the check-in comment template for windows. Strip out the cr characters before completing the commit. ... (check-in: e976aa6f user: drh tags: trunk)
16:19
Bug fix in wiki rendering. Avoid terminating the output when an an unrecognized markup attribute appears inside <verbatim>. ... (check-in: 71104b89 user: drh tags: trunk)
15:45
Better error messages when trying to run "fossil ui" with an invalid or unaccessible repository. ... (check-in: dcc48662 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/wikiformat.c.
621
622
623
624
625
626
627

628
629
630
631
632
633
634

635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650

651
652
653

654
655
656
657
658
659
660
661
662
663
  }
  zTag[j] = 0;
  p->iCode = findTag(zTag);
  p->iType = aMarkup[p->iCode].iType;
  p->nAttr = 0;
  while( isspace(z[i]) ){ i++; }
  while( p->nAttr<8 && isalpha(z[i]) ){

    j = 0;
    while( isalnum(z[i]) ){ 
      if( j<sizeof(zTag)-1 ) zTag[j++] = tolower(z[i]);
      i++;
    }
    zTag[j] = 0;
    p->aAttr[p->nAttr].iCode = iCode = findAttr(zTag);

    while( isspace(z[i]) ){ z++; }
    if( z[i]!='=' ){
      p->aAttr[p->nAttr].zValue = 0;
      p->aAttr[p->nAttr].cTerm = 0;
      c = 0;
    }else{
      i++;
      while( isspace(z[i]) ){ z++; }
      if( z[i]=='"' ){
        i++;
        zValue = &z[i];
        while( z[i] && z[i]!='"' ){ i++; }
      }else{
        zValue = &z[i];
        while( !isspace(z[i]) && z[i]!='>' ){ z++; }
      }

      p->aAttr[p->nAttr].zValue = zValue;
      p->aAttr[p->nAttr].cTerm = c = z[i];
      z[i] = 0;

      i++;
    }
    if( iCode!=0 && (seen & aAttribute[iCode].iMask)==0 ){
      seen |= aAttribute[iCode].iMask;
      p->nAttr++;
    }
    while( isspace(z[i]) ){ i++; }
    if( z[i]=='>' || (z[i]=='/' && z[i+1]=='>') ) break;
  }
}







>







>
















>
|
|
|
>


|







621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
  }
  zTag[j] = 0;
  p->iCode = findTag(zTag);
  p->iType = aMarkup[p->iCode].iType;
  p->nAttr = 0;
  while( isspace(z[i]) ){ i++; }
  while( p->nAttr<8 && isalpha(z[i]) ){
    int attrOk;    /* True to preserver attribute.  False to ignore it */
    j = 0;
    while( isalnum(z[i]) ){ 
      if( j<sizeof(zTag)-1 ) zTag[j++] = tolower(z[i]);
      i++;
    }
    zTag[j] = 0;
    p->aAttr[p->nAttr].iCode = iCode = findAttr(zTag);
    attrOk = iCode!=0 && (seen & aAttribute[iCode].iMask)==0;
    while( isspace(z[i]) ){ z++; }
    if( z[i]!='=' ){
      p->aAttr[p->nAttr].zValue = 0;
      p->aAttr[p->nAttr].cTerm = 0;
      c = 0;
    }else{
      i++;
      while( isspace(z[i]) ){ z++; }
      if( z[i]=='"' ){
        i++;
        zValue = &z[i];
        while( z[i] && z[i]!='"' ){ i++; }
      }else{
        zValue = &z[i];
        while( !isspace(z[i]) && z[i]!='>' ){ z++; }
      }
      if( attrOk ){
        p->aAttr[p->nAttr].zValue = zValue;
        p->aAttr[p->nAttr].cTerm = c = z[i];
        z[i] = 0;
      }
      i++;
    }
    if( attrOk ){
      seen |= aAttribute[iCode].iMask;
      p->nAttr++;
    }
    while( isspace(z[i]) ){ i++; }
    if( z[i]=='>' || (z[i]=='/' && z[i+1]=='>') ) break;
  }
}