Skip to content

Commit 3b773fe

Browse files
committed
Version 1.0.7
1 parent ca977af commit 3b773fe

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

berry/utils/HTMLHelper.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ public function URLFriendly(string $string): string
4848
return strtolower(trim($string, '-'));
4949
}
5050

51+
/**
52+
* Returns an HTML-safe version of the given string.
53+
* @param string $str The input string to be escaped.
54+
* @param string $encoding (optional) The character encoding to use. Defaults to 'UTF-8'.
55+
* @return string The HTML-escaped version of the input string.
56+
*/
57+
public function MakeHTMLSafe($str, $encoding = 'UTF-8')
58+
{
59+
return htmlspecialchars($str, ENT_QUOTES, $encoding);
60+
}
5161
}
5262

5363
?>

berry/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
SOFTWARE.
2424
*/
2525

26-
// Version 1.0.6
26+
// Version 1.0.7
2727
?>
2828

0 commit comments

Comments
 (0)