You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
If an <a> is missing an href altogether, this will crash. If it has href="" it's fine and will return an empty string, but if it has href='' it will return an incorrect string including the quotes (because '(.+?)' refuses to match the pattern, and so it falls back to the third option). I think<a href=> or <a href= > would also fail, but I'm not actually sure what the HTML spec says about that.
The text was updated successfully, but these errors were encountered:
Currently proposed fix: Change the +s to *s in the regex so that it will match empty hrefs, and also check that match is not null (and return null in that case) before trying to subscript it.
sapper export
will crash in certain situations involving missing or emptyhref
s on links.If an
<a>
is missing anhref
altogether, this will crash. If it hashref=""
it's fine and will return an empty string, but if it hashref=''
it will return an incorrect string including the quotes (because'(.+?)'
refuses to match the pattern, and so it falls back to the third option). I think<a href=>
or<a href= >
would also fail, but I'm not actually sure what the HTML spec says about that.The text was updated successfully, but these errors were encountered: