|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2007-2022, Arshan Dabirsiaghi, Jason Li |
| 2 | + * Copyright (c) 2007-2023, Arshan Dabirsiaghi, Jason Li |
3 | 3 | *
|
4 | 4 | * All rights reserved.
|
5 | 5 | *
|
6 |
| - * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
| 6 | + * Redistribution and use in source and binary forms, with or without modification, are permitted |
| 7 | + * provided that the following conditions are met: |
7 | 8 | *
|
8 |
| - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. |
9 |
| - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
10 |
| - * Neither the name of OWASP nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
| 9 | + * Redistributions of source code must retain the above copyright notice, this list of conditions |
| 10 | + * and the following disclaimer. Redistributions in binary form must reproduce the above copyright |
| 11 | + * notice, this list of conditions and the following disclaimer in the documentation and/or other |
| 12 | + * materials provided with the distribution. Neither the name of OWASP nor the names of its |
| 13 | + * contributors may be used to endorse or promote products derived from this software without |
| 14 | + * specific prior written permission. |
11 | 15 | *
|
12 |
| - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
13 |
| - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
14 |
| - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
15 |
| - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
16 |
| - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
17 |
| - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
18 |
| - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
19 |
| - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
20 |
| - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
21 |
| - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
22 |
| - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 16 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR |
| 17 | + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND |
| 18 | + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
| 19 | + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 20 | + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 21 | + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER |
| 22 | + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
| 23 | + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 | 24 | */
|
24 | 25 |
|
25 | 26 | package org.owasp.validator.html.scan;
|
26 | 27 |
|
27 | 28 | import java.util.*;
|
28 | 29 | import java.util.regex.Pattern;
|
29 |
| -import net.sourceforge.htmlunit.cyberneko.filters.DefaultFilter; |
30 |
| -import net.sourceforge.htmlunit.xerces.util.AugmentationsImpl; |
31 |
| -import net.sourceforge.htmlunit.xerces.util.XMLAttributesImpl; |
32 |
| -import net.sourceforge.htmlunit.xerces.util.XMLStringBuffer; |
33 |
| -import net.sourceforge.htmlunit.xerces.xni.Augmentations; |
34 |
| -import net.sourceforge.htmlunit.xerces.xni.QName; |
35 |
| -import net.sourceforge.htmlunit.xerces.xni.XMLAttributes; |
36 |
| -import net.sourceforge.htmlunit.xerces.xni.XMLString; |
37 |
| -import net.sourceforge.htmlunit.xerces.xni.XNIException; |
38 |
| -import net.sourceforge.htmlunit.xerces.xni.parser.XMLDocumentFilter; |
| 30 | +import org.htmlunit.cyberneko.filters.DefaultFilter; |
| 31 | +import org.htmlunit.cyberneko.xerces.util.XMLAttributesImpl; |
| 32 | +import org.htmlunit.cyberneko.xerces.util.XMLStringBuffer; |
| 33 | +import org.htmlunit.cyberneko.xerces.xni.Augmentations; |
| 34 | +import org.htmlunit.cyberneko.xerces.xni.QName; |
| 35 | +import org.htmlunit.cyberneko.xerces.xni.XMLAttributes; |
| 36 | +import org.htmlunit.cyberneko.xerces.xni.XMLString; |
| 37 | +import org.htmlunit.cyberneko.xerces.xni.XNIException; |
| 38 | +import org.htmlunit.cyberneko.xerces.xni.parser.XMLDocumentFilter; |
39 | 39 | import org.owasp.validator.css.CssScanner;
|
40 | 40 | import org.owasp.validator.html.CleanResults;
|
41 | 41 | import org.owasp.validator.html.InternalPolicy;
|
@@ -191,9 +191,9 @@ public void endElement(QName element, Augmentations augs) throws XNIException {
|
191 | 191 | // "text/css");
|
192 | 192 | // start the CSS element
|
193 | 193 |
|
194 |
| - super.startElement(element, cssAttributes, new AugmentationsImpl()); |
| 194 | + super.startElement(element, cssAttributes, augs); |
195 | 195 | // send the cleaned content
|
196 |
| - super.characters(new XMLStringBuffer(results.getCleanHTML()), new AugmentationsImpl()); |
| 196 | + super.characters(new XMLStringBuffer(results.getCleanHTML()), augs); |
197 | 197 | // end the CSS element
|
198 | 198 | super.endElement(element, augs);
|
199 | 199 | }
|
|
0 commit comments