private static void Initialize() { // don't initialize providers more than once if (_initialized) { return; } // get the configuration section for the feature var sanitizerConfig = (ProviderSanitizerSection)WebConfigurationManager.GetSection("system.web/sanitizer"); if (sanitizerConfig != null) { _providers = new SanitizerProviderCollection(); // use the ProvidersHelper class to call Initialize on each // configured provider ProvidersHelper.InstantiateProviders(sanitizerConfig.Providers, _providers, typeof(SanitizerProvider)); // set a reference to the default provider _provider = _providers[sanitizerConfig.DefaultProvider]; } // set this feature as initialized _initialized = true; }
public HtmlEditorExtender() { EnableClientState = true; sanitizerProvider = Sanitizer.Sanitizer.GetProvider(); }