equal
deleted
inserted
replaced
980 * @param string $matches |
980 * @param string $matches |
981 * @return string |
981 * @return string |
982 */ |
982 */ |
983 function decodeCharReferencesCallback( $matches ) { |
983 function decodeCharReferencesCallback( $matches ) { |
984 if( $matches[1] != '' ) { |
984 if( $matches[1] != '' ) { |
985 return Sanitizer::decodeEntity( $matches[1] ); |
985 return decodeEntity( $matches[1] ); |
986 } elseif( $matches[2] != '' ) { |
986 } elseif( $matches[2] != '' ) { |
987 return Sanitizer::decodeChar( intval( $matches[2] ) ); |
987 return decodeChar( intval( $matches[2] ) ); |
988 } elseif( $matches[3] != '' ) { |
988 } elseif( $matches[3] != '' ) { |
989 return Sanitizer::decodeChar( hexdec( $matches[3] ) ); |
989 return decodeChar( hexdec( $matches[3] ) ); |
990 } elseif( $matches[4] != '' ) { |
990 } elseif( $matches[4] != '' ) { |
991 return Sanitizer::decodeChar( hexdec( $matches[4] ) ); |
991 return decodeChar( hexdec( $matches[4] ) ); |
992 } |
992 } |
993 # Last case should be an ampersand by itself |
993 # Last case should be an ampersand by itself |
994 return $matches[0]; |
994 return $matches[0]; |
995 } |
995 } |
996 |
996 |