Skip to content
Permalink
Browse files

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 Sep 21, 2011
1 parent 3b1a11e commit db51c0539af5a9d2c386b0c7a5738022a4f0bb30
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/View/Helper/TextHelper.php
@@ -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
);

0 comments on commit db51c05

Please sign in to comment.
You can’t perform that action at this time.