Branch: Tag:

2000-11-08

2000-11-08 01:33:48 by Martin Nilsson <mani@lysator.liu.se>

Fixes a <default> problem when using values containing spaces [bug 672 (#672)].

Rev: server/modules/tags/rxmltags.pike:1.187

7:   #define _rettext id->misc->defines[" _rettext"]   #define _ok id->misc->defines[" _ok"]    - constant cvs_version = "$Id: rxmltags.pike,v 1.186 2000/10/20 22:02:37 nilsson Exp $"; + constant cvs_version = "$Id: rxmltags.pike,v 1.187 2000/11/08 01:33:48 nilsson Exp $";   constant thread_safe = 1;   constant language = roxen->language;   
1578:       while(sizeof(tmp)>2) {    stop=search(tmp[2],"<"); -  if(sscanf(tmp[1],"%*svalue=%s%*[ >]",nvalue)!=3 && -  sscanf(tmp[1],"%*sVALUE=%s%*[ >]",nvalue)!=3) nvalue=tmp[2][..stop==-1?sizeof(tmp[2]):stop]; -  if(!sscanf(nvalue, "\"%s\"", nvalue)) sscanf(nvalue, "'%s'", nvalue); +  if(sscanf(tmp[1],"%*svalue=%s",nvalue)!=2 && +  sscanf(tmp[1],"%*sVALUE=%s",nvalue)!=2) +  nvalue=tmp[2][..stop==-1?sizeof(tmp[2]):stop]; +  else if(!sscanf(nvalue, "\"%s\"", nvalue) && !sscanf(nvalue, "'%s'", nvalue)) +  sscanf(nvalue, "%s%*[ >]", nvalue);    selected=Regexp(".*[Ss][Ee][Ll][Ee][Cc][Tt][Ee][Dd].*")->match(tmp[1]);    ret+="<"+tmp[0]+tmp[1];    if(value[nvalue] && !selected) ret+=" selected=\"selected\"";