Skip to content

Commit 1bed608

Browse files
Undo code that is not necessary
1 parent abcbe13 commit 1bed608

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/cdn.cls.php

-12
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ private function _replace_file_types()
275275
*/
276276
private function _replace_img()
277277
{
278-
// Replace image links from <img src>
279278
preg_match_all('#<img([^>]+?)src=([\'"\\\]*)([^\'"\s\\\>]+)([\'"\\\]*)([^>]*)>#i', $this->content, $matches);
280279
foreach ($matches[3] as $k => $url) {
281280
// Check if is a DATA-URI
@@ -290,17 +289,6 @@ private function _replace_img()
290289
$html_snippet = sprintf('<img %1$s src=%2$s %3$s>', $matches[1][$k], $matches[2][$k] . $url2 . $matches[4][$k], $matches[5][$k]);
291290
$this->content = str_replace($matches[0][$k], $html_snippet, $this->content);
292291
}
293-
294-
// Replace image links from <a href>
295-
preg_match_all('#<a([^>]+?)href=([\'"\\\]*)([^"\']+\.(?:jpg|jpeg|png|gif|svg|webp))([\'"\\\]*)([^>]*)>#i', $this->content, $matches);
296-
foreach ($matches[3] as $k => $url) {
297-
if (!($url2 = $this->rewrite($url, Base::CDN_MAPPING_INC_IMG))) {
298-
continue;
299-
}
300-
301-
$html_snippet = sprintf('<a %1$s href=%2$s %3$s>', $matches[1][$k], $matches[2][$k] . $url2 . $matches[4][$k], $matches[5][$k]);
302-
$this->content = str_replace($matches[0][$k], $html_snippet, $this->content);
303-
}
304292
}
305293

306294
/**

0 commit comments

Comments
 (0)