added lbry link parsing to claims description

This commit is contained in:
Akinwale Ariwodola 2017-06-16 08:02:22 +01:00
parent a74b794aaf
commit 5e6d6b468c

View file

@ -61,7 +61,7 @@ $desc = $claim->Description;
if (strlen(trim($desc)) == 0) {
$desc = '<em>No description available.</em>';
} else {
$desc = preg_replace('#((https?|ftp)://(\S*?\.\S*?))([\s)\[\]{},;"\':<]|\.\s|$)#i','<a href="$1" target="_blank" rel="nofollow">$1</a>$4', $desc);
$desc = preg_replace('#((https?|ftp|lbry)://(\S*?\.\S*?))([\s)\[\]{},;"\':<]|\.\s|$)#i','<a href="$1" target="_blank" rel="nofollow">$1</a>$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', '<a href="mailto:$0" rel="nofollow">$0</a>', $desc);
}