diet-ng 1.8.3: source/diet/internal/html.d:185: data modification (truncation) in filterHTMLEscape?
Sönke Ludwig
sludwig at outerproduct.org
Mon Apr 28 13:30:00 UTC 2025
Am 27.04.2025 um 23:01 schrieb kdevel:
> The actual modification happens in the line marked as `(1)`. But this
is not the location of the root cause.
>
> The variable `ch` is of type `dchar`. Does anybody see the problem?
>
> ```d
> case 'a': .. case 'z': goto case;
> case 'A': .. case 'Z': goto case;
> case '0': .. case '9': goto case;
> case ' ', '\t', '-', '_', '.', ':', ',', ';',
> '#', '+', '*', '?', '=', '(', ')', '/', '!',
> '%' , '{', '}', '[', ']', '`', '´', '$', '^', '~':
> dst.put(cast(char)ch); // <<----- (1)
> break;
> ```
I was going to say that these are all ASCII characters, but it appears
that the '´' has slipped in there erroneously (0xB4, outside of the
ASCII range).
More information about the Digitalmars-d
mailing list