/*
* [StripHTMLEntities.java]
*
* Summary: Convert HTML & back to & but ignore <tags>.
*
* 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;
/**
* Convert HTML & back to & but ignore <tags>.
*
* @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 StripHTMLEntities extends TextProcessor
{
/**
* Converts & entities in HTML back to &. will turn into ordinary space.
*
* @param raw A string containing HTML & style entities. may not be null.
*
* @return text with & etc. converted to characters. leaves \n alone.
*/
public String process( String raw )
{
return DeEntifyStrings.deEntifyHTML( raw, ' ' );
}
} // end StripHTMLEntities