lib/onebox/engine/google_docs_onebox.rb in onebox-1.5.21 vs lib/onebox/engine/google_docs_onebox.rb in onebox-1.5.22
- old
+ new
@@ -6,9 +6,10 @@
def self.supported_endpoints
%w(spreadsheets document forms presentation)
end
matches_regexp /^(https?:)?\/\/(docs\.google\.com)\/(?<endpoint>(#{supported_endpoints.join('|')}))\/d\/((?<key>[\w-]*)).+$/
+ always_https
def to_html
if document?
"<iframe class='gdocs-onebox document-onebox' src='https://docs.google.com/document/d/#{key}/pub?embedded=true' style='border: 0' width='800' height='600' frameborder='0' scrolling='yes' ></iframe>"
elsif spreadsheet?
\ No newline at end of file