diff --git a/code/sitefeatures/PageComment.php b/code/sitefeatures/PageComment.php index 408cc118..fb478e7d 100755 --- a/code/sitefeatures/PageComment.php +++ b/code/sitefeatures/PageComment.php @@ -56,6 +56,10 @@ class PageComment extends DataObject { } } + function CommentTextWithLinks() { + return preg_replace("#\[(([a-zA-Z]+://)([a-zA-Z0-9?&%.;:/=+_-]*))\]#", "'$1'", $this->Comment); + } + function SpamLink() { $member = Member::currentUser(); if(Permission::check('CMS_ACCESS_CMSMain') && !$this->getField('IsSpam')) {