}
out.write(textEvent.getText());
} else if (event instanceof SAXEndElementEvent) {
SAXEndElementEvent endElementEvent = (SAXEndElementEvent) event;
String elementName = endElementEvent.getName();
if (Boolean.FALSE.equals(closedStack.removeFirst())) {
if ("script".equals(elementName)) {
out.write('>');
out.write("</");