From 10f271ce67efadd3e7df648f03d9d492b9556277 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 16 Jun 2017 08:17:58 +0100 Subject: [PATCH] lbry url regex update --- src/Template/Main/claims.ctp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Template/Main/claims.ctp b/src/Template/Main/claims.ctp index f59508c..660f1a0 100644 --- a/src/Template/Main/claims.ctp +++ b/src/Template/Main/claims.ctp @@ -61,7 +61,7 @@ $desc = $claim->Description; if (strlen(trim($desc)) == 0) { $desc = 'No description available.'; } else { - $desc = preg_replace('#((https?|ftp|lbry)://(\S*?\.\S*?))([\s)\[\]{},;"\':<]|\.\s|$)#i','$1$4', $desc); + $desc = preg_replace('#((https?|ftp|lbry)://([A-Za-z0-9\-\/]+|\S*?\.\S*?))([\s)\[\]{},;"\':<]|\.\s|$)#i','$1$4', $desc); $desc = preg_replace('/(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/is', '$0', $desc); } @@ -218,7 +218,7 @@ if (strlen(trim($desc)) == 0) {
ClaimType == 1 ? $claim->Name : ((strlen(trim($claim->Title)) > 0) ? $claim->Title : 'No Title') ?>
- +
Description)) > 0 ? $claim->Description : 'No description available' ?>