mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fix TextHelper::autoLinkUrls() from linking iframes
iframe and img elements should not be autolinked. Fixes #GH-208
This commit is contained in:
parent
3b1a11e2d2
commit
db51c0539a
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue