Fossil

Check-in [68bd2e7b]
Login

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

Overview
Comment:Integrate andygoth-quote-apostrophe. Needed because single quotes can be used in the tag filter entry, and these single quotes would otherwise be passed through unprotected to the output HTML.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | andygoth-timeline-ms
Files: files | file ages | folders
SHA1: 68bd2e7bedb8d05a893978af8da12d61faaa18da
User & Date: andygoth 2016-11-04 20:49:23
Context
2016-11-04
21:12
Improve quoting of match tags and patterns. Ignore empty match tags and patterns. check-in: 98cc8782 user: andygoth tags: andygoth-timeline-ms
20:49
Integrate andygoth-quote-apostrophe. Needed because single quotes can be used in the tag filter entry, and these single quotes would otherwise be passed through unprotected to the output HTML. check-in: 68bd2e7b user: andygoth tags: andygoth-timeline-ms
16:21
Add timeline web UI to set tag filter and match style. Still not 100%. (1) Now that more than one text entry is on the page, pressing enter does not trigger a submit [Firefox ESR 10.0.12], (2) electing "Related" causes Tag Filter to blank, (3) entering a tag filter while "Related" is selected causes "Related" to be deselected, (4) possibly too much clutter, and (5) definitely too much clutter if combined with any future expansions. (1) is due to the lack of a submit button. (2) and (3) are a bad interaction between the t=/r= dichotomy and the design of style_submenu_entry(). (4) maybe could be addressed by changing "Related"/"Branch Only" and "Without Files"/"With Files" to checkbuttons, but style_submenu_checkbox() was never actually implemented. (Probably also want "Unhide" to be a checkbox.) For (5) I have in mind letting the admin define a project-specific list of preset filters. check-in: d4a6d3c1 user: andygoth tags: andygoth-timeline-ms
2016-10-24
18:32
Merge changes.wiki style update check-in: 780c0150 user: andygoth tags: andygoth-timeline-ms
2016-05-23
15:46
Merge trunk Closed-Leaf check-in: ca59c662 user: andygoth tags: andygoth-quote-apostrophe
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/encode.c.

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
72
73
74
75
76
77
78







79
80
81
82
83
84
85
...
110
111
112
113
114
115
116





117
118
119
120
121
122
123
#include "encode.h"

/*
** Make the given string safe for HTML by converting every "<" into "&lt;",
** every ">" into "&gt;" and every "&" into "&amp;".  Return a pointer
** to a new string obtained from malloc().
**
** We also encode " as &quot; so that it can appear as an argument
** to markup.
*/
char *htmlize(const char *zIn, int n){
  int c;
  int i = 0;
  int count = 0;
  char *zOut;
................................................................................
        zOut[i++] = '&';
        zOut[i++] = 'q';
        zOut[i++] = 'u';
        zOut[i++] = 'o';
        zOut[i++] = 't';
        zOut[i++] = ';';
        break;







      default:
        zOut[i++] = c;
        break;
    }
    zIn++;
  }
  zOut[i] = 0;
................................................................................
        blob_append(p, "&amp;", 5);
        j = i+1;
        break;
      case '"':
        if( j<i ) blob_append(p, zIn+j, i-j);
        blob_append(p, "&quot;", 6);
        j = i+1;





        break;
    }
  }
  if( j<i ) blob_append(p, zIn+j, i-j);
}









|







 







>
>
>
>
>
>
>







 







>
>
>
>
>







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
...
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#include "encode.h"

/*
** Make the given string safe for HTML by converting every "<" into "&lt;",
** every ">" into "&gt;" and every "&" into "&amp;".  Return a pointer
** to a new string obtained from malloc().
**
** We also encode " as &quot; and ' as &#39; so they can appear as an argument
** to markup.
*/
char *htmlize(const char *zIn, int n){
  int c;
  int i = 0;
  int count = 0;
  char *zOut;
................................................................................
        zOut[i++] = '&';
        zOut[i++] = 'q';
        zOut[i++] = 'u';
        zOut[i++] = 'o';
        zOut[i++] = 't';
        zOut[i++] = ';';
        break;
      case '\'':
        zOut[i++] = '&';
        zOut[i++] = '#';
        zOut[i++] = '3';
        zOut[i++] = '9';
        zOut[i++] = ';';
        break;
      default:
        zOut[i++] = c;
        break;
    }
    zIn++;
  }
  zOut[i] = 0;
................................................................................
        blob_append(p, "&amp;", 5);
        j = i+1;
        break;
      case '"':
        if( j<i ) blob_append(p, zIn+j, i-j);
        blob_append(p, "&quot;", 6);
        j = i+1;
        break;
      case '\'':
        if( j<i ) blob_append(p, zIn+j, i-j);
        blob_append(p, "&#39;", 5);
        j = i+1;
        break;
    }
  }
  if( j<i ) blob_append(p, zIn+j, i-j);
}


Changes to src/markdown_html.c.

70
71
72
73
74
75
76


77
78
79
80
81
82
83
        BLOB_APPEND_LITERAL(ob, "&lt;");
      }else if( data[i]=='>' ){
        BLOB_APPEND_LITERAL(ob, "&gt;");
      }else if( data[i]=='&' ){
        BLOB_APPEND_LITERAL(ob, "&amp;");
      }else if( data[i]=='"' ){
        BLOB_APPEND_LITERAL(ob, "&quot;");


      }else{
        break;
      }
      i++;
    }
  }
}







>
>







70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
        BLOB_APPEND_LITERAL(ob, "&lt;");
      }else if( data[i]=='>' ){
        BLOB_APPEND_LITERAL(ob, "&gt;");
      }else if( data[i]=='&' ){
        BLOB_APPEND_LITERAL(ob, "&amp;");
      }else if( data[i]=='"' ){
        BLOB_APPEND_LITERAL(ob, "&quot;");
      }else if( data[i]=='\'' ){
        BLOB_APPEND_LITERAL(ob, "&#39;");
      }else{
        break;
      }
      i++;
    }
  }
}