/* * [StripHTMLTags.java] * * Summary: Removes HTML <tags> but not &. * * Copyright: (c) 2002-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 4.5 2009-02-26 add both Java string quoting and plain for Java search/regexes. */ package com.mindprod.quoter; import com.mindprod.entities.DeEntifyStrings; /** * Removes HTML <tags> but not &. * * @author Roedy Green, Canadian Mind Products * @version 4.5 2009-02-26 add both Java string quoting and plain for Java search/regexes. * @since 2002-06-19 */ final class StripHTMLTags extends TextProcessor { /** * Removes tags from HTML leaving just the raw text. Does not convert & back to &. *

*

     *   \n in the HTML are treated as space.
     *   @param raw   input HTML
     *   @return text, with whitespaces collapsed to a single space, and tags
     * removed.
     *   Inside <pre> leaves \n an space as is.
     * 
*/ public String process( String raw ) { return DeEntifyStrings.stripHTMLTags( raw ); } // end process } // end StripHTMLTags