Code Duplication    Length = 4-4 lines in 2 locations

sources/subs/Util.class.php 1 location

@@ 34-37 (lines=4) @@
31
		$num = $string[0] === 'x' ? hexdec(substr($string, 1)) : (int) $string;
32
33
		// We don't allow control characters, characters out of range, byte markers, etc
34
		if ($num < 0x20 || $num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF) || $num == 0x202D || $num == 0x202E)
35
			return '';
36
		else
37
			return '&#' . $num . ';';
38
	}
39
40
	/**

sources/Subs.php 1 location

@@ 1352-1355 (lines=4) @@
1349
	$num = $matches[2][0] === 'x' ? hexdec(substr($matches[2], 1)) : (int) $matches[2];
1350
1351
	// We don't allow control characters, characters out of range, byte markers, etc
1352
	if ($num < 0x20 || $num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF) || $num == 0x202D || $num == 0x202E)
1353
		return '';
1354
	else
1355
		return '&#' . $num . ';';
1356
}
1357
1358
/**