libs/web: template: fix spurious nil or false values that broke various templates
[project/luci.git] / libs / web / src / template_parser.c
index 9618919..fe324ce 100644 (file)
 
 /* leading and trailing code for different types */
 const char * gen_code[6][2] = {
-       { "write(\"",                   "\")"   },
-       { NULL,                                 NULL    },
-       { "write(tostring(",    "))"    },
-       { "include(\"",                 "\")"   },
-       { "write(translate(\"", "\"))"  },
-       { NULL,                                 " "             }
+       { "write(\"",                   "\")"                   },
+       { NULL,                                 NULL                    },
+       { "write(tostring(",    " or \"\"))"    },
+       { "include(\"",                 "\")"                   },
+       { "write(translate(\"", "\"))"                  },
+       { NULL,                                 " "                             }
 };
 
 /* Simple strstr() like function that takes len arguments for both haystack and needle. */