diff --git a/include/class.format.php b/include/class.format.php index 53ad259c6e29e27423e56bba772b70a184e1529f..24e1e38c35b5079886dec5d69a46dbb0d41eceda 100644 --- a/include/class.format.php +++ b/include/class.format.php @@ -228,7 +228,7 @@ class Format { function localizeInlineImages($text) { // Change file.php urls back to content-id's return preg_replace( - '/src="(?:\/[^"]+?)?\/file\\.php\\?(?:\w+=[^&]+&(?:amp;)?)*?key=([^&]+)[^"]*/', + '`src="(?:https?:/)?(?:/[^/"]+)*?/file\\.php\\?(?:\w+=[^&]+&(?:amp;)?)*?key=([^&]+)[^"]*`', 'src="cid:$1', $text); }