microformats / microformats2-parsing

For collecting and handling issues with the microformats2 parsing specification: http://microformats.org/wiki/microformats2-parsing
14 stars 6 forks source link

u- parsing should always do relative URL resolution #10

Closed Zegnat closed 5 years ago

Zegnat commented 7 years ago

This question is separate from but affects #9.

Currently the parsing description for u- properties is as follows:

  • if a.u-x[href] or area.u-x[href], then get the href attribute
  • else if img.u-x[src] or audio.u-x[src] or video.u-x[src] or source.u-x[src], then get the src attribute
  • else if video.u-x[poster], then get the poster attribute
  • else if object.u-x[data], then get the data attribute
  • if there is a gotten value, return the normalized absolute URL of it, following the containing document's language's rules for resolving relative URLs (e.g. in HTML, use the current URL context as determined by the page, and first element, if any).
  • else parse the element for the value-class-pattern. If a value is found, return it.
  • else if abbr.u-x[title], then return the title attribute
  • else if data.u-x[value] or input.u-x[value], then return the value attribute
  • else return the textContent of the element after removing all leading/trailing whitespace and nested Githubissues.
  • Githubissues is a development platform for aggregating issues.