Code Duplication    Length = 5-5 lines in 3 locations

includes/upload/UploadBase.php 3 locations

@@ 1458-1462 (lines=5) @@
1455
		/*
1456
		 * check for elements that can contain javascript
1457
		 */
1458
		if ( $strippedElement == 'script' ) {
1459
			wfDebug( __METHOD__ . ": Found script element '$element' in uploaded file.\n" );
1460
1461
			return [ 'uploaded-script-svg', $strippedElement ];
1462
		}
1463
1464
		# e.g., <svg xmlns="http://www.w3.org/2000/svg">
1465
		#  <handler xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="load">alert(1)</handler> </svg>
@@ 1466-1470 (lines=5) @@
1463
1464
		# e.g., <svg xmlns="http://www.w3.org/2000/svg">
1465
		#  <handler xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="load">alert(1)</handler> </svg>
1466
		if ( $strippedElement == 'handler' ) {
1467
			wfDebug( __METHOD__ . ": Found scriptable element '$element' in uploaded file.\n" );
1468
1469
			return [ 'uploaded-script-svg', $strippedElement ];
1470
		}
1471
1472
		# SVG reported in Feb '12 that used xml:stylesheet to generate javascript block
1473
		if ( $strippedElement == 'stylesheet' ) {
@@ 1473-1477 (lines=5) @@
1470
		}
1471
1472
		# SVG reported in Feb '12 that used xml:stylesheet to generate javascript block
1473
		if ( $strippedElement == 'stylesheet' ) {
1474
			wfDebug( __METHOD__ . ": Found scriptable element '$element' in uploaded file.\n" );
1475
1476
			return [ 'uploaded-script-svg', $strippedElement ];
1477
		}
1478
1479
		# Block iframes, in case they pass the namespace check
1480
		if ( $strippedElement == 'iframe' ) {