|
|
@ -903,13 +903,15 @@
|
|
|
|
$entry->setAttribute('rel', 'noopener noreferrer');
|
|
|
|
$entry->setAttribute('rel', 'noopener noreferrer');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($entry->nodeName == 'img') {
|
|
|
|
|
|
|
|
|
|
|
|
if ($entry->hasAttribute('src')) {
|
|
|
|
if ($entry->hasAttribute('src')) {
|
|
|
|
$src = rewrite_relative_url($site_url, $entry->getAttribute('src'));
|
|
|
|
$src = rewrite_relative_url($site_url, $entry->getAttribute('src'));
|
|
|
|
|
|
|
|
|
|
|
|
$cached_filename = CACHE_DIR . '/images/' . sha1($src) . '.png';
|
|
|
|
$cached_filename = CACHE_DIR . '/images/' . sha1($src) . '.png';
|
|
|
|
|
|
|
|
|
|
|
|
if (file_exists($cached_filename)) {
|
|
|
|
if (file_exists($cached_filename)) {
|
|
|
|
$src = SELF_URL_PATH . '/public.php?op=cached_image&hash=' . sha1($src);
|
|
|
|
$src = SELF_URL_PATH . '/public.php?op=cached_image&hash=' . sha1($src) . '.png';
|
|
|
|
|
|
|
|
|
|
|
|
if ($entry->hasAttribute('srcset')) {
|
|
|
|
if ($entry->hasAttribute('srcset')) {
|
|
|
|
$entry->removeAttribute('srcset');
|
|
|
|
$entry->removeAttribute('srcset');
|
|
|
@ -923,7 +925,6 @@
|
|
|
|
$entry->setAttribute('src', $src);
|
|
|
|
$entry->setAttribute('src', $src);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($entry->nodeName == 'img') {
|
|
|
|
|
|
|
|
if ($entry->hasAttribute('src')) {
|
|
|
|
if ($entry->hasAttribute('src')) {
|
|
|
|
$is_https_url = parse_url($entry->getAttribute('src'), PHP_URL_SCHEME) === 'https';
|
|
|
|
$is_https_url = parse_url($entry->getAttribute('src'), PHP_URL_SCHEME) === 'https';
|
|
|
|
|
|
|
|
|
|
|
|