libs/web: template: fix spurious nil or false values that broke various templates
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 5 Aug 2009 00:52:51 +0000 (00:52 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 5 Aug 2009 00:52:51 +0000 (00:52 +0000)
libs/web/src/template_parser.c

index 9618919b30c8b468d324a518dbbe157f02977c3e..fe324cedc85d4929b817da29b0c413cbaef5d8d5 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. */