Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix TextHelper::autoLinkUrls() from linking iframes
iframe and img elements should not be autolinked.
Fixes #GH-208
  • Loading branch information
daVinciWanaB authored and markstory committed Oct 11, 2011
1 parent 3b1a11e commit db51c05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/View/Helper/TextHelper.php
Expand Up @@ -120,7 +120,7 @@ public function stripLinks($text) {
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
);
Expand Down

0 comments on commit db51c05

Please sign in to comment.