aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/parser/handler.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/parser/handler.php')
-rw-r--r--inc/parser/handler.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index 409b0e08d..8910c28fe 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -980,11 +980,11 @@ class Doku_Handler
$title = null;
// add protocol on simple short URLs
- if (substr($url, 0, 3) == 'ftp' && (substr($url, 0, 6) != 'ftp://')) {
+ if (str_starts_with($url, 'ftp') && !str_starts_with($url, 'ftp://')) {
$title = $url;
$url = 'ftp://' . $url;
}
- if (substr($url, 0, 3) == 'www' && (substr($url, 0, 7) != 'http://')) {
+ if (str_starts_with($url, 'www')) {
$title = $url;
$url = 'http://' . $url;
}