diff options
context:
space:
mode:
Diffstat (limited to 'source/ui-blob.c')
-rw-r--r--source/ui-blob.c7
1 file changed, 5 insertions, 2 deletions
diff --git a/source/ui-blob.c b/source/ui-blob.c
index bc91656..7720a28 100644
--- a/source/ui-blob.c
+++ b/source/ui-blob.c
@@ -67,7 +67,7 @@ done:
return walk_tree_ctx.found_path;
}
-int cgit_print_file(char *path, const char *head, int file_only)
+int cgit_print_file(char *path, const char *head, int file_only, int html_escape)
{
struct object_id oid;
enum object_type type;
@@ -106,7 +106,10 @@ int cgit_print_file(char *path, const char *head, int file_only)
if (!buf)
return -1;
buf[size] = '\0';
- html_raw(buf, size);
+ if (html_escape)
+ html_txt(buf);
+ else
+ html_raw(buf, size);
free(buf);
return 0;
}