mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-10-01 05:05:19 +00:00
Fixed umlaute in summary display
SVN revision: 1971
This commit is contained in:
parent
b4aa19dab4
commit
9de9d872cd
56
src/elogd.c
56
src/elogd.c
@ -427,6 +427,7 @@ void compose_base_url(LOGBOOK * lbs, char *base_url, int size, BOOL email_notify
|
|||||||
void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command);
|
void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command);
|
||||||
char *loc(char *orig);
|
char *loc(char *orig);
|
||||||
void strencode(char *text);
|
void strencode(char *text);
|
||||||
|
void strencode_nouml(char *text);
|
||||||
int scan_attributes(char *logbook);
|
int scan_attributes(char *logbook);
|
||||||
int is_inline_attachment(char *encoding, int message_id, char *text, int i, char *att);
|
int is_inline_attachment(char *encoding, int message_id, char *text, int i, char *att);
|
||||||
int setgroup(char *str);
|
int setgroup(char *str);
|
||||||
@ -8099,6 +8100,57 @@ void strencode(char *text)
|
|||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
void strencode_nouml(char *text)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < (int) strlen(text); i++) {
|
||||||
|
switch (text[i]) {
|
||||||
|
case '\n':
|
||||||
|
rsprintf("<br>\n");
|
||||||
|
break;
|
||||||
|
case '<':
|
||||||
|
rsprintf("<");
|
||||||
|
break;
|
||||||
|
case '>':
|
||||||
|
rsprintf(">");
|
||||||
|
break;
|
||||||
|
case '&':
|
||||||
|
if (strncmp(text+i+2, "uml", 3) == 0)
|
||||||
|
rsprintf("%c", text[i]);
|
||||||
|
else
|
||||||
|
rsprintf("&");
|
||||||
|
break;
|
||||||
|
case '\"':
|
||||||
|
rsprintf(""");
|
||||||
|
break;
|
||||||
|
case ' ':
|
||||||
|
rsprintf(" ");
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* the translation for the search highliting */
|
||||||
|
|
||||||
|
case '\001':
|
||||||
|
rsprintf("<");
|
||||||
|
break;
|
||||||
|
case '\002':
|
||||||
|
rsprintf(">");
|
||||||
|
break;
|
||||||
|
case '\003':
|
||||||
|
rsprintf("\"");
|
||||||
|
break;
|
||||||
|
case '\004':
|
||||||
|
rsprintf(" ");
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
rsprintf("%c", text[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------*/
|
||||||
|
|
||||||
void xmlencode(char *text)
|
void xmlencode(char *text)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -16624,7 +16676,7 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
|
|||||||
e.g. only the start of a table */
|
e.g. only the start of a table */
|
||||||
strip_html(str);
|
strip_html(str);
|
||||||
if (str[0])
|
if (str[0])
|
||||||
strencode(str);
|
strencode_nouml(str);
|
||||||
else
|
else
|
||||||
rsputs(" ");
|
rsputs(" ");
|
||||||
} else {
|
} else {
|
||||||
@ -16671,7 +16723,7 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
|
|||||||
e.g. only the start of a table */
|
e.g. only the start of a table */
|
||||||
strip_html(str);
|
strip_html(str);
|
||||||
if (str[0])
|
if (str[0])
|
||||||
strencode(str);
|
strencode_nouml(str);
|
||||||
else
|
else
|
||||||
rsputs(" ");
|
rsputs(" ");
|
||||||
rsputs("</td>\n");
|
rsputs("</td>\n");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user