Code Duplication    Length = 3-4 lines in 2 locations

src/wp-includes/class-wp-simplepie-sanitize-kses.php 1 location

@@ 51-53 (lines=3) @@
48
		}
49
		if ( $type & ( SIMPLEPIE_CONSTRUCT_HTML | SIMPLEPIE_CONSTRUCT_XHTML ) ) {
50
			$data = wp_kses_post( $data );
51
			if ( $this->output_encoding !== 'UTF-8' ) {
52
				$data = $this->registry->call( 'Misc', 'change_encoding', array( $data, 'UTF-8', $this->output_encoding ) );
53
			}
54
			return $data;
55
		} else {
56
			return parent::sanitize( $data, $type, $base );

src/wp-includes/SimplePie/Sanitize.php 1 location

@@ 376-379 (lines=4) @@
373
				$data = htmlspecialchars($data, ENT_COMPAT, 'UTF-8');
374
			}
375
376
			if ($this->output_encoding !== 'UTF-8')
377
			{
378
				$data = $this->registry->call('Misc', 'change_encoding', array($data, 'UTF-8', $this->output_encoding));
379
			}
380
		}
381
		return $data;
382
	}