Browse Source

twitter2clickable.diff to make links clickable in shaarli (don't use it)

master
n 8 months ago
parent
commit
775cce4dc3
Signed by: n GPG Key ID: E96086FC951DAE30
  1. 1
      README.md
  2. 11
      twitter2clickable.diff

1
README.md

@ -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
* [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
-------

11
twitter2clickable.diff

@ -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…
Cancel
Save