Commit Graph

1 Commits

Author SHA1 Message Date
Doug Bunting 037196d5c7 Restore `null` and `string.Empty` handling from `EncoderExtensions`
- prior test encoders were never invoked for `null` or empty `string`s e.g.
``` c#
    public static void HtmlEncode(this IHtmlEncoder htmlEncoder, string value, TextWriter output)
    {
...
        if (!String.IsNullOrEmpty(value))
        {
            htmlEncoder.HtmlEncode(value, 0, value.Length, output);
        }
    }
```
- add missing `null` checks and handle `string.Empty` in `TextWriter output, string value, ...` overloads
  - better match for the underlying `TextEncoder` behaviour
  - `EncoderExtensions` provided an API like `TextEncoder.Encode(TextWriter output, string value)`
    - that method calls `Encode(TextWriter output, string value, int startIndex, int characterCount)`
2015-11-02 09:40:42 -08:00