Commaaa2
This commit is contained in:
10
vendor/league/commonmark/src/Util/Xml.php
vendored
10
vendor/league/commonmark/src/Util/Xml.php
vendored
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the league/commonmark package.
|
||||
*
|
||||
@@ -16,15 +18,15 @@ namespace League\CommonMark\Util;
|
||||
|
||||
/**
|
||||
* Utility class for handling/generating XML and HTML
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Xml
|
||||
{
|
||||
/**
|
||||
* @param string $string
|
||||
*
|
||||
* @return string
|
||||
* @psalm-pure
|
||||
*/
|
||||
public static function escape($string)
|
||||
public static function escape(string $string): string
|
||||
{
|
||||
return \str_replace(['&', '<', '>', '"'], ['&', '<', '>', '"'], $string);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user