| 669 | */ |
| 670 | |
| 671 | static void |
| 672 | cgi_puturi(const char *s, /* I - String to output */ |
| 673 | FILE *out) /* I - Output file */ |
| 674 | { |
| 675 | while (*s) |
| 676 | { |
| 677 | if (strchr("%@&+ <>#=", *s) || *s < ' ' || *s & 128) |
| 678 | fprintf(out, "%%%02X", *s & 255); |
| 679 | else |
| 680 | putc(*s, out); |
| 681 | |
| 682 | s ++; |
| 683 | } |
| 684 | } |