mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Split href before decoding instead of after
Fixes #123228 This fixes the case where `#` appears in the path
This commit is contained in:
@@ -428,7 +428,8 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
|
||||
|
||||
|
||||
private async onDidClickPreviewLink(href: string) {
|
||||
let [hrefPath, fragment] = decodeURIComponent(href).split('#');
|
||||
const [rawPath, fragment] = href.split('#');
|
||||
let hrefPath = decodeURIComponent(rawPath);
|
||||
|
||||
if (hrefPath[0] !== '/') {
|
||||
// We perviously already resolve absolute paths.
|
||||
|
||||
Reference in New Issue
Block a user