Escape URLs more aggressively.
Format-EscapedUrl.ps1 [-Uri] <Uri[]> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Format-EscapedUrl.ps1 [-Clipboard] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Some characters such as apostrophes and parentheses are legal for URLs, but are a hassle within certain formats (Markdown, JSON, SQL, &c).
This script URL-escapes these characters to %xx format.
Format-EscapedUrl.ps1 -Clipboard
Updates the URL on the clipboard with a more aggressively escaped version.
Format-EscapedUrl.ps1 "https://example.com/search(en-US)?q=Name%20%3D%20'System'&sort=y"
https://example.com/search%28en-US%29?q=Name%20%3D%20%27System%27&sort=y
The URL to format for maximum compatibility.
Type: Uri[]
Parameter Sets: Uri
Aliases: Url
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Indicates that the URL comes from the clipboard, and is updated on the clipboard.
Type: SwitchParameter
Parameter Sets: Clipboard
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.