Fix TextHelper::autoLinkUrls() from linking iframes

iframe and img elements should not be autolinked.
Fixes #GH-208
This commit is contained in:
Dave 2011-09-21 17:50:48 -03:00 committed by mark_story
parent 3b1a11e2d2
commit db51c0539a

View file

@ -120,7 +120,7 @@ class TextHelper extends AppHelper {
public function autoLinkUrls($text, $htmlOptions = array()) {
$this->_linkOptions = $htmlOptions;
$text = preg_replace_callback(
'#(?<!href="|">)((?:https?|ftp|nntp)://[^\s<>()]+)#i',
'#(?<!href="|src="|">)((?:https?|ftp|nntp)://[^\s<>()]+)#i',
array(&$this, '_linkBareUrl'),
$text
);