Yannis ROSSETTO (rossettoy)2021-05-29 14:43 After some tests, links seem to be clickable. Closing. Status changed from Verified to ClosedClose date set to 2021-05-29
Sandra Echinard (sechinard)2013-05-23 10:43Status changed from New to VerifiedReported in version cleared values: 5.6
Nicolas Terray (nterray)2012-12-10 10:36 Hi, There is an existing method to convert links in a text. $hp = Codendi_HTMLPurifier::instance(); $text_with_links = $hp->purify($text, CODENDI_PURIFIER_BASIC); Note: It also prunes potential XSS vulnerabilities Since I cannot test the same in my localhost to detect the same as this functionality can't be replicated in localhost Developers MUST ensure that the contribution they submit effectively fix the bug. You have to configure your development environment to be able to fully test the functionality. Thanks, Nicolas Terray Platform set to Is an Enhancement or an internal improvement? set to
Biswajit Das (Biswajit)2012-12-10 08:57 Hi, For fixing this bug, i need to embed the below code in my earlier post inside /plugins/forumml/www/message.php file. For that, Can anyone please let me know inside which variable is the discussion content body stored, so that I can pass that content to my function to convert the links to clickable. Since I cannot test the same in my localhost to detect the same as this functionality can't be replicated in localhost
Biswajit Das (Biswajit)2012-12-07 19:54 The following code snippet converts the links to clickable present in any sentence say $text $text = trim($text); while ($text != stripslashes($text)) { $text = stripslashes($text); } $text = strip_tags($text,"<b><i><u>"); $text = preg_replace("/(?<!http:\/\/)www\./","http://www.",$text); $text = preg_replace( "/((http|ftp)+(s)?:\/\/[^<>\s]+)/i", "<a href=\"\\0\" target=\"_blank\">\\0</a>",$text); The posts in the discussion can be made to pass through this snippet, by passing the contents inside $text variable and it should work.
Biswajit Das (Biswajit)2012-12-05 07:15 last edited by: Biswajit Das (Biswajit) 2012-12-07 20:00 Hi Martin, I would like to look into the issue. Biswajit