Module: MyPDFKit::HTMLPreprocessor
- Defined in:
- lib/my_pdfkit/html_preprocessor.rb
Class Method Summary collapse
-
.process(html, root_url, protocol) ⇒ Object
Change relative paths to absolute, and relative protocols to absolute protocols.
Class Method Details
.process(html, root_url, protocol) ⇒ Object
Change relative paths to absolute, and relative protocols to absolute protocols
7 8 9 10 11 |
# File 'lib/my_pdfkit/html_preprocessor.rb', line 7 def self.process(html, root_url, protocol) html = translate_relative_paths(html, root_url) if root_url html = translate_relative_protocols(html, protocol) if protocol html end |