Website Summary Files Commits Branches @commit @diff @stats
path: root / html.h
Commit message (Collapse)AuthorAgeLinesSHA
* html: html_ntxt with no ellipsis
 Jeff Smith
2017-10-03-1/+17078725
| | | | | | | | | For implementing a ui-blame page, there is need for a function that outputs a selection from a block of text, transformed for HTML output, but with no further modifications or additions. Signed-off-by: Jeff Smith <whydoubt@gmail.com> Reviewed-by: John Keeping <john@keeping.me.uk>
* Simplify http_parse_querystring()
 Lukas Fleischer
2016-10-01-1/+1927b0ae
| | | | | | | | | | | Instead of reimplementing URL parameter parsing from scratch, use url_decode_parameter_name() and url_decode_parameter_value() which are already provided by Git. Also, change the return type of http_parse_querystring() to void since its only caller already ignores the return value. Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
* ui-shared: prevent malicious filename from injecting headers
 Jason A. Donenfeld
2016-01-14-0/+1513b386
|
* html: remove html_status()
 John Keeping
2015-08-14-1/+0fb2c71f
| | | | | | This is now unused. Signed-off-by: John Keeping <john@keeping.me.uk>
* html.c: add various strbuf and varadic helpers
 John Keeping
2013-04-08-1/+10fd00d2f
| | | | | | | | | | This adds the fmtalloc helper, html_txtf, html_vtxtf, and html_attrf. These takes a printf style format string like htmlf but escapes the resulting string. The html_vtxtf variant takes a va_list whereas html_txtf is variadic. Signed-off-by: John Keeping <john@keeping.me.uk>
* Always #include corresponding .h in .c files
 John Keeping
2013-04-08-1/+18f20879
| | | | | | | | | | | | While doing this, remove declarations from header files where the corresponding definition is declared "static" in order to avoid build errors. Also re-order existing headers in ui-*.c so that the file-specific header always comes immediately after "cgit.h", helping with future consistency. Signed-off-by: John Keeping <john@keeping.me.uk>
* html.c: add html_intoption()
 Lars Hjemli
2011-03-06-0/+11a64fd2
| | | | | | This is similar to html_option, but for int values. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* use __attribute__ to catch printf format mistakes
 Mark Lodato
2010-09-04-0/+3a4c58d9
| | | | | | | Use "__attribute__((format (printf,N,M)))", as is done in git, do catch mistakes in printf-style format strings. Signed-off-by: Mark Lodato <lodatom@gmail.com>
* html: make all strings 'const char *'
 Mark Lodato
2010-02-08-9/+98aab27f
| | | | | | | | None of the html_* functions modify their argument, so they can all be 'const char *' instead of a simple 'char *'. This removes the need to cast (or copy) when trying to print a const string. Signed-off-by: Mark Lodato <lodatom@gmail.com>
* html.c: add html_url_path
 Lars Hjemli
2008-10-05-0/+122a597e
| | | | | | | This function can be used to generate properly escaped path-components for links. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* html.c: add html_url_arg
 Lars Hjemli
2008-10-05-0/+1a36a0d9
| | | | | | This function can be used to properly escape querystring parameter values. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Supply status description to html_status()
 Lars Hjemli
2008-08-06-1/+1885096c
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Implement plain view
 Lars Hjemli
2008-08-06-0/+1e5da4bc
| | | | | | | This implements a way to access plain blobs by path (similar to the tree view) instead of by sha1. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add support for cloning over http
 Lars Hjemli
2008-08-06-0/+102a545e
| | | | | | | This patch implements basic support for cloning over http, based on the work on git-http-backend by Shawn O. Pearce. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Move cgit_parse_query() from parsing.c to html.c as http_parse_querystring()
 Lars Hjemli
2008-04-08-0/+2e87e896
| | | | | | This is a generic http-function. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Introduce html.h
 Lars Hjemli
2008-03-18-0/+18b1f9b9c
All html-functions can be quite easily separated from the rest of cgit, so lets do it; the only issue was html_filemode which uses some git-defined macros so the function is moved into ui-shared.c::cgit_print_filemode(). Signed-off-by: Lars Hjemli <hjemli@gmail.com>