
When the <base> tag is used, the @base wasn't handed down all the way to URLs and photos, this patch fixes this problem. In addition to that it also makes it possible to handle u-url on <input> tags.
23 lines
454 B
Ruby
23 lines
454 B
Ruby
module Microformats2
|
|
module Property
|
|
class Url < Foundation
|
|
|
|
def to_s
|
|
@to_s = Microformats2::AbsoluteUri.new(@base, super.to_s).absolutize
|
|
end
|
|
|
|
protected
|
|
|
|
def attr_map
|
|
@attr_map = {
|
|
"a" => "href",
|
|
"area" => "href",
|
|
"img" => "src",
|
|
"object" => "data",
|
|
"abbr" => "title",
|
|
"data" => "value",
|
|
"input" => "value" }
|
|
end
|
|
end
|
|
end
|
|
end
|