--- loncom/homework/cleanxml/xml_to_loncapa.pm 2015/12/18 22:08:51 1.2 +++ loncom/homework/cleanxml/xml_to_loncapa.pm 2015/12/23 20:33:10 1.3 @@ -1,7 +1,7 @@ # The LearningOnline Network # convert_file takes a well-formed XML file content and converts it to LON-CAPA syntax. # -# $Id: xml_to_loncapa.pm,v 1.2 2015/12/18 22:08:51 damieng Exp $ +# $Id: xml_to_loncapa.pm,v 1.3 2015/12/23 20:33:10 damieng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -95,7 +95,7 @@ sub node_to_string { $s .= escape_attribute($attribute->nodeValue); $s .= '"'; } - if ($node->hasChildNodes()) { + if ($node->hasChildNodes() || $tag eq 'script') { $s .= '>'; foreach my $child ($node->childNodes) { $s .= node_to_string($child);