libs/web: various changes in template library
[project/luci.git] / libs / web / src / template_parser.c
index 69f0f1c4854c1b4171d2dee00edc6f5a685b4f77..60544513151320d0df50c474abcbfc1040704d83 100644 (file)
@@ -244,7 +244,7 @@ template_format_chunk(struct template_parser *parser, size_t *sz)
                switch (c->type)
                {
                        case T_TYPE_TEXT:
-                               escape_luastr(buf, c->s, c->e - c->s, 0);
+                               luastr_escape(buf, c->s, c->e - c->s, 0);
                                break;
 
                        case T_TYPE_EXPR:
@@ -254,15 +254,15 @@ template_format_chunk(struct template_parser *parser, size_t *sz)
                                break;
 
                        case T_TYPE_INCLUDE:
-                               escape_luastr(buf, c->s, c->e - c->s, 0);
+                               luastr_escape(buf, c->s, c->e - c->s, 0);
                                break;
 
                        case T_TYPE_I18N:
-                               translate_luastr(buf, c->s, c->e - c->s, 1);
+                               luastr_translate(buf, c->s, c->e - c->s, 1);
                                break;
 
                        case T_TYPE_I18N_RAW:
-                               translate_luastr(buf, c->s, c->e - c->s, 0);
+                               luastr_translate(buf, c->s, c->e - c->s, 0);
                                break;
 
                        case T_TYPE_CODE:
@@ -350,8 +350,6 @@ int template_error(lua_State *L, struct template_parser *parser)
        int line = 0;
        int chunkline = 0;
 
-       fprintf(stderr, "E[%s]\n", err);
-
        if ((ptr = strfind((char *)err, strlen(err), "]:", 2)) != NULL)
        {
                chunkline = atoi(ptr + 2) - parser->prv_chunk.line;