Skip to content

Commit 4f491c8

Browse files
author
dereuromark
committed
Fix BC.
1 parent 6b2afc7 commit 4f491c8

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/Utility/Utility.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public static function cleanUrl($url, $headerRedirect = false) {
216216
}
217217

218218
/**
219-
* Remove http:// or other protocols from the link
219+
* Removes http:// or other protocols from the link.
220220
*
221221
* @param string $url
222222
* @param array $protocols Defaults to http and https. Pass empty array for all.

src/View/Helper/TextHelper.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@ public function minimizeUrl($url, $max = null, array $options = []) {
8282
return $front . $placeholder . $end;
8383
}
8484

85+
/**
86+
* Removes http:// or other protocols from the link.
87+
*
88+
* @param string $url
89+
* @param array $protocols Defaults to http and https. Pass empty array for all.
90+
* @return string strippedUrl
91+
*/
92+
public function stripProtocol($url, $protocols = ['http', 'https']) {
93+
return Utility::stripProtocol($url, $protocols);
94+
}
95+
8596
/**
8697
* Transforming int values into ordinal numbers (1st, 3rd, ...).
8798
* When using HTML, you can use <sup>, as well.

0 commit comments

Comments
 (0)