mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR fixed comment text linking (from r83187)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@89818 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9b234ca7f1
commit
31e996a56b
@ -57,7 +57,9 @@ class PageComment extends DataObject {
|
||||
}
|
||||
|
||||
function CommentTextWithLinks() {
|
||||
return preg_replace("#\[(([a-zA-Z]+://)([a-zA-Z0-9?&%.;:/=+_-]*))\]#", "'<a rel=\"nofollow\" href=\"$1\" target=\"_blank\">$1</a>'", $this->Comment);
|
||||
$pattern = '|([a-zA-Z]+://)([a-zA-Z0-9?&%.;:/=+_-]*)|is';
|
||||
$replace = '<a rel="nofollow" href="$1$2">$1$2</a>';
|
||||
return preg_replace($pattern, $replace, $this->Comment);
|
||||
}
|
||||
|
||||
function SpamLink() {
|
||||
|
Loading…
Reference in New Issue
Block a user