mirror of
https://code.rocketnine.space/tslocum/tinyib.git
synced 2025-01-17 00:28:18 +01:00
parent
2805934548
commit
93c91aec20
@ -26,6 +26,13 @@ function cleanString($string) {
|
||||
return str_replace($search, $replace, $string);
|
||||
}
|
||||
|
||||
function cleanQuotes($string) {
|
||||
$search = array("'", "\"");
|
||||
$replace = array("'", """);
|
||||
|
||||
return str_replace($search, $replace, $string);
|
||||
}
|
||||
|
||||
function plural($count, $singular, $plural) {
|
||||
if ($plural == 's') {
|
||||
$plural = $singular . $plural;
|
||||
|
@ -95,8 +95,8 @@ function _makeLinksClickable($matches) {
|
||||
if (!isset($matches[1])) {
|
||||
return '';
|
||||
}
|
||||
$url = str_replace('&', '&', htmlspecialchars($matches[1], ENT_QUOTES));
|
||||
$text = htmlentities($matches[1], ENT_QUOTES);
|
||||
$url = cleanQuotes($matches[1]);
|
||||
$text = $matches[1];
|
||||
return '<a href="' . $url . '" target="_blank">' . $text . '</a>';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user