Example #1
0
        public static String StripSpecficKeywords(String rtf, bool newLinesToSpace = true, params String[] disallowedKeywords)
        {
            if (string.IsNullOrWhiteSpace(rtf)) {
                return rtf;
            }

            var handler = new NegativeVetFilteringRTFHandler(newLinesToSpace, disallowedKeywords);
            RTFReader reader = new RTFReader(rtf, handler, false);

            reader.parse();
            return handler.getFilteredText();
        }
Example #2
0
        public static String StripSpecficKeywords(String rtf, bool newLinesToSpace = true, params String[] disallowedKeywords)
        {
            if (string.IsNullOrWhiteSpace(rtf))
            {
                return(rtf);
            }

            var       handler = new NegativeVetFilteringRTFHandler(newLinesToSpace, disallowedKeywords);
            RTFReader reader  = new RTFReader(rtf, handler, false);

            reader.parse();
            return(handler.getFilteredText());
        }