]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-repolist.c
filter: add lua support
[ps-cgit] / ui-repolist.c
index d4ee2798c0d9be1ec02a308b4072ac97b0889c42..7b1fec307f2f0927034d9b8299d2bd9a379730cb 100644 (file)
@@ -106,7 +106,9 @@ static int is_in_url(struct cgit_repo *repo)
 
 static void print_sort_header(const char *title, const char *sort)
 {
-       htmlf("<th class='left'><a href='%s?s=%s", cgit_rooturl(), sort);
+       html("<th class='left'><a href='");
+       html_attr(cgit_rooturl());
+       htmlf("?s=%s", sort);
        if (ctx.qry.search) {
                html("&amp;q=");
                html_url_arg(ctx.qry.search);
@@ -331,13 +333,9 @@ void cgit_print_site_readme()
 {
        if (!ctx.cfg.root_readme)
                return;
-       if (ctx.cfg.about_filter) {
-               ctx.cfg.about_filter->argv[1] = ctx.cfg.root_readme;
-               cgit_open_filter(ctx.cfg.about_filter);
-       }
+       if (ctx.cfg.about_filter)
+               cgit_open_filter(ctx.cfg.about_filter, ctx.cfg.root_readme);
        html_include(ctx.cfg.root_readme);
-       if (ctx.cfg.about_filter) {
+       if (ctx.cfg.about_filter)
                cgit_close_filter(ctx.cfg.about_filter);
-               ctx.cfg.about_filter->argv[1] = NULL;
-       }
 }