From 3ca26ac166e6f1021e23f4e4c3f50466aedfb04e Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 11 Feb 2009 13:07:26 +0000 Subject: Closes #684: Scratching a particular itch of mine by no longer hiding urls when converting them to active links. This issue has caused many a headache. The url is now preserved but with a inserted after every /, this lets long urls be wrapped without breaking the url. git-svn-id: https://code.elgg.org/elgg/trunk@2717 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/input.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engine/lib/input.php') diff --git a/engine/lib/input.php b/engine/lib/input.php index b338e530c..80329462e 100644 --- a/engine/lib/input.php +++ b/engine/lib/input.php @@ -116,12 +116,12 @@ **/ function parse_urls($text) { - + if (preg_match_all('/(?"\'\!\(\)]+)/ie', $text, $urls)) { foreach (array_unique($urls[1]) AS $url){ - $urltext = $url; - $text = str_replace($url, ''. elgg_echo("link:view") .'', $text); + $urltext = str_replace('/', '/', $url); + $text = str_replace($url, ''. $urltext .'', $text); } } -- cgit v1.2.3