twitter2clickable.diff to make links clickable in shaarli (don't use it)
This commit is contained in:
parent
7b4ca18ba8
commit
775cce4dc3
2 changed files with 12 additions and 0 deletions
|
@ -31,6 +31,7 @@ Patches
|
||||||
|
|
||||||
* [alcasar_logo.patch](https://forge.tourmentine.com/n/scripts/src/master/alcasar_logo.patch) => small patch to add a background changer for ALCASAR webpages
|
* [alcasar_logo.patch](https://forge.tourmentine.com/n/scripts/src/master/alcasar_logo.patch) => small patch to add a background changer for ALCASAR webpages
|
||||||
* [shaarli_OleG.0.9.0.patch](https://forge.tourmentine.com/n/scripts/src/master/shaarli_OleG.0.9.0.patch) => Open Graph support for Shaarli 0.9.X ( Hi [Charly](https://fr.wikipedia.org/wiki/Charly_Oleg)! ). no more necessary in Shaarli 0.10.0 and after
|
* [shaarli_OleG.0.9.0.patch](https://forge.tourmentine.com/n/scripts/src/master/shaarli_OleG.0.9.0.patch) => Open Graph support for Shaarli 0.9.X ( Hi [Charly](https://fr.wikipedia.org/wiki/Charly_Oleg)! ). no more necessary in Shaarli 0.10.0 and after
|
||||||
|
* [twitter2clickable](https://forge.tourmentine.com/n/scripts/src/master/twitter2clickable.diff) => makes Twitter & Fediverse links clickable in Shaarli 0.9.X-0.11.X ( Hi [Charly](https://fr.wikipedia.org/wiki/Charly_Oleg)! ). no more usable in Shaarli 0.12.X, please use [clickat plugin](https://forge.tourmentine.com/n/clickat) instead
|
||||||
|
|
||||||
Monitoring
|
Monitoring
|
||||||
-------
|
-------
|
||||||
|
|
11
twitter2clickable.diff
Normal file
11
twitter2clickable.diff
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- application/bookmark/LinkUtils.php 2019-04-18 22:08:00.087837000 +0200
|
||||||
|
+++ ../Shaarli-0.10.3/application/bookmark/LinkUtils.php 2019-03-09 14:45:54.988629000 +0100
|
||||||
|
@@ -140,7 +140,7 @@
|
||||||
|
*/
|
||||||
|
function text2clickable($text, $redirector = '', $urlEncode = true)
|
||||||
|
{
|
||||||
|
- $regex = '!(((?:https?|ftp|file)://|apt:|magnet:)\S+[a-z0-9_\(\)]/?)!si';
|
||||||
|
+ $regex = '!(((?:https?|ftp|file)://|apt:|magnet:|@)\S+[a-z0-9_\(\)]/?)!si';
|
||||||
|
|
||||||
|
if (empty($redirector)) {
|
||||||
|
return preg_replace($regex, '<a href="$1">$1</a>', $text);
|
Loading…
Reference in a new issue