Bug 125052 Ability to embed javascript in the html output.
The main reason behind this enhancement is to provide interactivity in a static report. For example, consider the scenario where an application uses the birt report engine to export the reports to an html file. The exported html file has no interactivity such as sorting, hover over text, etc. With the ability to embed javascript in the html output exploiters can provide interactive reports. I would like to have the ability to provide the html renderer javascript to embed in the report or embed the url where the javascript is located.
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/parser/HTMLTextParser.java
* Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/
package org.eclipse.birt.report.engine.parser;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashSet;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.Text;
import org.w3c.tidy.Tidy;
/**
 * Parse the content of text according to the HTML specification to get the DOM
 * tree.
 * <p>
 * After parsing, the DOM tree has a <code>Document</code> node that has a
 * <code>Element</code> child node whose tag name is body. All other nodes
 * that need to be processed to output are the descendant nodes of "body" node.
 * <p>
 * 
 */
public class HTMLTextParser
{