Skip to content

Commit

Permalink
Update for issue #3 to populate https vs. http schema/protocol at run…
Browse files Browse the repository at this point in the history
…time rather than at cache time.
  • Loading branch information
ryancramerdesign committed Mar 9, 2014
1 parent 8cc54cf commit beba197
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion TextformatterVideoEmbed.module
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TextformatterVideoEmbed extends Textformatter implements ConfigurableModul
public static function getModuleInfo() {
return array(
'title' => __('Video embed for YouTube/Vimeo', __FILE__),
'version' => 105,
'version' => 106,
'summary' => __('Enter a full YouTube or Vimeo URL by itself in any paragraph (example: http://www.youtube.com/watch?v=Wl4XiYadV_k) and this will automatically convert it to an embedded video. This formatter is intended to be run on trusted input. Recommended for use with TinyMCE textarea fields.', __FILE__),
'author' => 'Ryan Cramer',
'href' => 'http://modules.processwire.com/modules/textformatter-video-embed/'
Expand Down Expand Up @@ -94,6 +94,8 @@ class TextformatterVideoEmbed extends Textformatter implements ConfigurableModul
}

$result->free();
// account for possibility that stored embed code contains http version while requested on https
if($this->http == 'https') $embedCode = str_replace('http://', 'https://', $embedCode);
return $embedCode;
}

Expand Down

0 comments on commit beba197

Please sign in to comment.