Permalink
Browse files

Leave external HTTPS elements as HTTPS as on HTTP pages.

  • Loading branch information...
1 parent ab345c9 commit 9c7fd07a4e3333209f12a00578e231d89e33dc7c @mvied committed Mar 23, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/WordPressHTTPS/Module/Parser.php
View
6 lib/WordPressHTTPS/Module/Parser.php
@@ -195,7 +195,7 @@ public function fixElements() {
if ( !$this->secureElement($url, $type) && $this->getPlugin()->getSetting('remove_unsecure') ) {
$this->_html = str_replace($html, '', $this->_html);
}
- } else if ( !$this->getPlugin()->isSsl() && strpos($url, 'https://') === 0 ) {
+ } else if ( !$this->getPlugin()->isSsl() && strpos($url, 'https://') === 0 && $this->getPlugin()->isUrlLocal($url) ) {
$this->unsecureElement($url, $type);
}
}
@@ -215,7 +215,7 @@ public function fixCssElements() {
$url = $matches[2][$i];
if ( $this->getPlugin()->isSsl() && ( $this->getPlugin()->getSetting('ssl_host_diff') || ( !$this->getPlugin()->getSetting('ssl_host_diff') && strpos($url, 'http://') === 0 ) ) ) {
$this->secureElement($url, 'style');
- } else if ( !$this->getPlugin()->isSsl() && strpos($url, 'https://') === 0 ) {
+ } else if ( !$this->getPlugin()->isSsl() && strpos($url, 'https://') === 0 && $this->getPlugin()->isUrlLocal($url) ) {
$this->unsecureElement($url, 'style');
}
}
@@ -279,7 +279,7 @@ public function fixExtensions() {
if ( preg_match('/\.' . $extension . '(\?|$)/', $filename) ) {
if ( $this->getPlugin()->isSsl() && ( $this->getPlugin()->getSetting('ssl_host_diff') || ( !$this->getPlugin()->getSetting('ssl_host_diff') && strpos($url, 'http://') === 0 ) ) ) {
$this->secureElement($url, $type);
- } else if ( !$this->getPlugin()->isSsl() && strpos($url, 'https://') === 0 ) {
+ } else if ( !$this->getPlugin()->isSsl() && strpos($url, 'https://') === 0 && $this->getPlugin()->isUrlLocal($url) ) {
$this->unsecureElement($url, $type);
}
}

0 comments on commit 9c7fd07

Please sign in to comment.