Avoid parsing ignored `<link>` types in `DocumentMeta#_getLinks`
Clean up `DocumentMeta#_getLinks` by removing several unnecessary variables and narrowing the scope of several others. In the process, avoid trying to normalize the URIs for `<link>` elements which are going to be ignored anyway because of their `rel` values. As a side effect this should fix https://github.com/hypothesis/lms/issues/375 because the `<link>` elements shown in https://github.com/hypothesis/lms/issues/375#issuecomment-444637947 will never get parsed. This doesn't close that issue because invalid URIs could still occur in the remaining `<link>` tags which are parsed.
Showing
Please register or sign in to comment