Fossil SCM

In http_exchange(), when stripping HTML tags from an error reply of the server, drop the ">" that ends each tag too.

dmestas 2026-11-22 11:36 UTC small-fixes
Commit 11fe4dd111981e55520f008fd2168eeeea36361843cd63d1b37043588e31aede
1 file changed +3 -2
+3 -2
--- src/http.c
+++ src/http.c
@@ -965,16 +965,17 @@
965965
}
966966
if( isError ){
967967
char *z;
968968
int i, j;
969969
z = blob_str(pReply);
970
- for(i=j=0; z[i]; i++, j++){
970
+ for(i=j=0; z[i]; i++){
971971
if( z[i]=='<' ){
972972
while( z[i] && z[i]!='>' ) i++;
973973
if( z[i]==0 ) break;
974
+ }else{
975
+ z[j++] = z[i];
974976
}
975
- z[j] = z[i];
976977
}
977978
z[j] = 0;
978979
if( mHttpFlags & HTTP_QUIET ){
979980
/* no-op */
980981
}else if( mHttpFlags & HTTP_VERBOSE ){
981982
--- src/http.c
+++ src/http.c
@@ -965,16 +965,17 @@
965 }
966 if( isError ){
967 char *z;
968 int i, j;
969 z = blob_str(pReply);
970 for(i=j=0; z[i]; i++, j++){
971 if( z[i]=='<' ){
972 while( z[i] && z[i]!='>' ) i++;
973 if( z[i]==0 ) break;
 
 
974 }
975 z[j] = z[i];
976 }
977 z[j] = 0;
978 if( mHttpFlags & HTTP_QUIET ){
979 /* no-op */
980 }else if( mHttpFlags & HTTP_VERBOSE ){
981
--- src/http.c
+++ src/http.c
@@ -965,16 +965,17 @@
965 }
966 if( isError ){
967 char *z;
968 int i, j;
969 z = blob_str(pReply);
970 for(i=j=0; z[i]; i++){
971 if( z[i]=='<' ){
972 while( z[i] && z[i]!='>' ) i++;
973 if( z[i]==0 ) break;
974 }else{
975 z[j++] = z[i];
976 }
 
977 }
978 z[j] = 0;
979 if( mHttpFlags & HTTP_QUIET ){
980 /* no-op */
981 }else if( mHttpFlags & HTTP_VERBOSE ){
982

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button