Module: FeedNormalizer::RewriteRelativeLinks

### Home Classes Methods

### In Files

- lib/structures.rb

### Methods

- #rewrite_relative_links

### Files

- History.txt
- License.txt
- Manifest.txt
- README.txt

### Class/Module Index

Quicksearch

- FeedNormalizer
- FeedNormalizer::ElementCleaner
- FeedNormalizer::ElementEquality
- FeedNormalizer::Entry
- FeedNormalizer::Feed
- FeedNormalizer::FeedNormalizer
- FeedNormalizer::HtmlCleaner
- FeedNormalizer::Parser
- FeedNormalizer::ParserRegistry
- FeedNormalizer::RewriteRelativeLinks
- FeedNormalizer::RubyRssParser
- FeedNormalizer::SimpleRssParser
- FeedNormalizer::Singular
- FeedNormalizer::TimeFix
- RSS
- RSS::Rss
- RSS::Rss::Channel
- RSS::Rss::Channel::Item
- RSS::Rss::Channel::Item::Enclosure
- SimpleRSS

No matching classes.

# FeedNormalizer::RewriteRelativeLinks

### Public Instance Methods

rewrite_relative_links(text, url) click to toggle source

    # File lib/structures.rb, line 136
    def rewrite_relative_links(text, url)
      if host = url_host(url)
        text.to_s.gsub(/(href|src)=('|")\//, '\1=\2http://' + host + '/')
      else
        text
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.