1. --- wordpress-https-2.0-dev.php 2011-09-10 17:52:25.000000000 -0700
  2. +++ wordpress-https.php 2011-09-11 01:16:39.000000000 -0700
  3. @@ -503,8 +502,8 @@
  4.          */
  5.         public function process($buffer) {
  6.             if ( $this->is_ssl() ) {
  7. -               // Fix any occurrence of the HTTPS version of the regular domain when using different SSL Host
  8. -               if ( $this->diff_host ) {
  9. +               // Fix any occurrence of the HTTPS version of the regular domain when using different SSL Host or a non-standard port
  10. +               if ( $this->diff_host || $this->ssl_port ) {
  11.                     $regex_url = preg_quote($this->replace_http($this->http_url));
  12.                     // Escape forward slashes
  13.                     $regex_url = str_replace('/', '\/', $regex_url);
  14. @@ -515,7 +514,7 @@
  15.                     for ($i = 0; $i<=sizeof($matches[0]); $i++) {
  16.                         $html = $matches[0][$i];
  17.                         $url = $matches[1][$i];
  18. -                       $buffer = str_replace($html, str_replace($url, $this->replace_https_url($url), $html), $buffer);
  19. +                       $buffer = str_replace($html, str_replace($url, $this->replace_http_url($url), $html), $buffer);
  20.                     }
  21.                 }