Tags: .NET 6 Episerver Find Optimizely CMS

Warning CS0618: 'TextIndexer' is obsolete: 'This class is no longer used by CMS and will be removed in a future release.'

I do not like warnings, and I prefer to get rid of them. If I upgrade to the latest version of Optimizely CMS and Search & Navigation – I will get this warning, if the TextIndexer.StripHtml() is used.

warning CS0618: 'TextIndexer' is obsolete: 'This class is no longer used by CMS and will be removed in a future release.'

So, what can we use instead? The extension method found here, can be used!

EPiServer.Find.Helpers.Text.StringExtensions.StripHtml()

That's it!

Found this post helpful? Help keep this blog ad-free by buying me a coffee! ☕