From d0c5f72781ba68128ef6b0a65310ae87b7bd4494 Mon Sep 17 00:00:00 2001 From: nishi Date: Sun, 4 Feb 2024 13:43:28 +0000 Subject: [PATCH] tag parse fix git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@162 d27a3e52-49c5-7645-884c-6793ebffc270 --- Library/Tag.c | 6 +++--- W3Version.h.p | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Tag.c b/Library/Tag.c index 42249bb..840ef9a 100644 --- a/Library/Tag.c +++ b/Library/Tag.c @@ -28,7 +28,7 @@ void W3_Tag_Parse(char* data, size_t size, void (*tagfunc)(char* tagname, char* bool comm_on = false; int abc = 0; for(i = 0; i < size; i++) { - if(phase == 1 && data[i] != ' ' && data[i] != '>') { + if(phase == 1 && data[i] != '\n' && data[i] != '\t' && data[i] != ' ' && data[i] != '>') { if(comm) { if(incr == 0 && data[i] != '!') comm = false; if(incr == 1 && data[i] != '-') comm = false; @@ -67,8 +67,8 @@ void W3_Tag_Parse(char* data, size_t size, void (*tagfunc)(char* tagname, char* char* tmp = text; text = __W3_Concat(tmp, cbuf); free(tmp); - } else if(phase == 1 && (data[i] == ' ' || data[i] == '>')) { - if(data[i] == ' ') { + } else if(phase == 1 && (data[i] == ' ' || data[i] == '\t' || data[i] == '\n' || data[i] == '>')) { + if(data[i] != '>') { phase = 2; free(attr); attr = malloc(1); diff --git a/W3Version.h.p b/W3Version.h.p index 1046e1e..a2af16d 100644 --- a/W3Version.h.p +++ b/W3Version.h.p @@ -6,7 +6,7 @@ extern "C" { #endif -#define LIBW3_VERSION "2.2I" \ +#define LIBW3_VERSION "2.2J" \ SUFFIX #ifdef __cplusplus -- 2.43.0