/// <summary>
 /// Instantiates an encoder using a custom code point filter. Any character not in the
 /// set returned by <paramref name="filter"/>'s <see cref="ICodePointFilter.GetAllowedCodePoints"/>
 /// method will be escaped.
 /// </summary>
 public JavaScriptStringEncoder(ICodePointFilter filter)
     : this(new JavaScriptStringUnicodeEncoder(CodePointFilter.Wrap(filter)))
 {
     if (filter == null)
     {
         throw new ArgumentNullException(nameof(filter));
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Instantiates an encoder using a custom code point filter. Any character not in the
 /// set returned by <paramref name="filter"/>'s <see cref="ICodePointFilter.GetAllowedCodePoints"/>
 /// method will be escaped.
 /// </summary>
 public HtmlEncoder(ICodePointFilter filter)
     : this(new HtmlUnicodeEncoder(CodePointFilter.Wrap(filter)))
 {
     if (filter == null)
     {
         throw new ArgumentNullException(nameof(filter));
     }
 }