-
Notifications
You must be signed in to change notification settings - Fork 203
HtmlDecode hrefs in Verify-Links.ps1 #10616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The following pipelines have been queued for testing: |
ef28a3e
to
b82b377
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR decodes HTML-encoded URLs in anchor hrefs to ensure that link resolution works correctly by using [System.Web.HttpUtility]::HtmlDecode.
- Renames the variable holding regex matches from $hrefs to $matches
- Adds a step to HTML-decode the href values before resolving them
- Updates verbose logging to reflect the changes
The following pipelines have been queued for testing: |
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#10616 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) Co-authored-by: Patrick Hallisey <[email protected]>
fixes #10601
In html, attribute values are encoded and should be decoded before use. If not decoded using
[HttpUtility]::HtmlDecode()
, the url is incorrect and the server should not be expected to process it correctly.In powershell, the markdown
is converted to the html
which is regex parsed to
and needs to be HtmlDecoded to