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