<NME> clean-html.xsl
<BEF> ADDFILE
<MSG> Implemented [ #313603 ] RFE: HTML Area: clean-up pasted HTML and prevent injections

<DFF> @@ -0,0 +1,27 @@
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+    <xsl:template match="/">
+        <dummy-root>
+            <xsl:apply-templates select="node()"/>
+        </dummy-root>
+    </xsl:template>
+
+    <xsl:template match="*:b | *:i | *:ul | *:li | *:ol | *:p | *:span | *:u | *:div" priority="2">
+        <xsl:element name="{local-name()}">
+            <xsl:apply-templates select="@*|node()"/>
+        </xsl:element>
+    </xsl:template>
+
+    <xsl:template match="*:script" priority="2"/>
+
+    <xsl:template match="@*" priority="1">
+        <xsl:copy-of select="."/>
+    </xsl:template>
+
+    <xsl:template match="*" priority="1">
+        <xsl:apply-templates/>
+    </xsl:template>
+
+    <xsl:template match="text()"><xsl:value-of select="."/></xsl:template>
+
+ </xsl:stylesheet>
\ No newline at end of file

{'addition_count': 27, 'commit_subject': 'Implemented [ #313603 ] RFE: HTML Area: clean-up pasted HTML and prevent injections', 'deletion_count': 0, 'file_extension': '.xsl', 'lang': 'xsl', 'license': 'lgpl-2.1', 'repo_name': 'orbeon/orbeon-forms'}