Differences From Artifact [17694892cb]:
- File src/search.c — part of check-in [76f8bfd5f9] at 2017-09-24 04:06:39 on branch andygoth-search-technote — Fix some bugs in tech note search indexing (user: andygoth size: 61784) [more...]
To Artifact [ce4fbba682]:
- File src/search.c — part of check-in [cee4af9e9c] at 2017-11-18 17:49:04 on branch trunk — Fix a crash that can occur in search when the FTS4 snippet() function returns NULL. (user: drh size: 61813)
| ︙ | |||
950 951 952 953 954 955 956 957 958 959 960 961 962 963 | 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 | + |
** converted into "<". This is similar to htmlize() except that
** <mark> and </mark> are preserved.
*/
static char *cleanSnippet(const char *zSnip){
int i;
int n = 0;
char *z;
if( zSnip==0 ) zSnip = "";
for(i=0; zSnip[i]; i++) if( zSnip[i]=='<' ) n++;
z = fossil_malloc( i+n*4+1 );
i = 0;
while( zSnip[0] ){
if( zSnip[0]=='<' ){
n = isSnippetMark(zSnip);
if( n ){
|
| ︙ |