genxScrubText(...) does not scrub text

Hi Tim,

  genxScrubText(...) does not work as advertised, it will never skip any
invalid octet sequence because it does not increment or reset the 'last'
pointer. I guess it is actually supposed to do something like

  ...
  while (*in)
  {
    int c = genxNextUnicodeChar(&in);
    if (c == -1 || !isXMLChar(w, c))
    {
      problems++;
      last = in; /* <-- */
      continue;
    }

    while (last < in)
      *out++ = *last++;
  }
  ...

regards.

Received on Friday, 19 March 2004 02:37:30 UTC