Code Duplication    Length = 5-5 lines in 3 locations

includes/upload/UploadBase.php 3 locations

@@ 1373-1377 (lines=5) @@
1370
		/*
1371
		 * check for elements that can contain javascript
1372
		 */
1373
		if ( $strippedElement == 'script' ) {
1374
			wfDebug( __METHOD__ . ": Found script element '$element' in uploaded file.\n" );
1375
1376
			return [ 'uploaded-script-svg', $strippedElement ];
1377
		}
1378
1379
		# e.g., <svg xmlns="http://www.w3.org/2000/svg">
1380
		#  <handler xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="load">alert(1)</handler> </svg>
@@ 1381-1385 (lines=5) @@
1378
1379
		# e.g., <svg xmlns="http://www.w3.org/2000/svg">
1380
		#  <handler xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="load">alert(1)</handler> </svg>
1381
		if ( $strippedElement == 'handler' ) {
1382
			wfDebug( __METHOD__ . ": Found scriptable element '$element' in uploaded file.\n" );
1383
1384
			return [ 'uploaded-script-svg', $strippedElement ];
1385
		}
1386
1387
		# SVG reported in Feb '12 that used xml:stylesheet to generate javascript block
1388
		if ( $strippedElement == 'stylesheet' ) {
@@ 1388-1392 (lines=5) @@
1385
		}
1386
1387
		# SVG reported in Feb '12 that used xml:stylesheet to generate javascript block
1388
		if ( $strippedElement == 'stylesheet' ) {
1389
			wfDebug( __METHOD__ . ": Found scriptable element '$element' in uploaded file.\n" );
1390
1391
			return [ 'uploaded-script-svg', $strippedElement ];
1392
		}
1393
1394
		# Block iframes, in case they pass the namespace check
1395
		if ( $strippedElement == 'iframe' ) {