Open thesandlord opened 4 years ago
The workaround is to overwrite the regex with ones that accept uppercase as well:
var absolutify = require('absolutify')
absolutify.rx = /((href|src|codebase|cite|background|cite|action|profile|formaction|icon|manifest|archive|HREF|SRC|CODEBASE|CITE|BACKGROUND|CITE|ACTION|PROFILE|FORMACTION|ICON|MANIFEST|ARCHIVE)=["'])(([.]+\/)|(?:\/)|(?=#))(?!\/)/g
absolutify.captureRx = /((href|src|codebase|cite|background|cite|action|profile|formaction|icon|manifest|archive|HREF|SRC|CODEBASE|CITE|BACKGROUND|CITE|ACTION|PROFILE|FORMACTION|ICON|MANIFEST|ARCHIVE)=["'])((([.]+\/)|(?:\/)|(?:#))(?!\/)[a-zA-Z0-9._-]+)/g
It seems like attributes in uppercase, for example:
are not detected.
Is this as intended? Happy to submit a PR to fix this!