Don't re-encode markdown styles http uris
Fixes #60742 These uris should already be encoded. Don't try encoding them again which may cause the uri to become invalid
This commit is contained in:
parent
481e001d0b
commit
1b812bade4
|
@ -104,7 +104,7 @@ export class MarkdownContentProvider {
|
|||
// Use href if it is already an URL
|
||||
const hrefUri = vscode.Uri.parse(href);
|
||||
if (['http', 'https'].indexOf(hrefUri.scheme) >= 0) {
|
||||
return hrefUri.toString();
|
||||
return hrefUri.toString(true);
|
||||
}
|
||||
|
||||
// Use href as file URI if it is absolute
|
||||
|
@ -131,7 +131,7 @@ export class MarkdownContentProvider {
|
|||
private computeCustomStyleSheetIncludes(resource: vscode.Uri, config: MarkdownPreviewConfiguration): string {
|
||||
if (Array.isArray(config.styles)) {
|
||||
return config.styles.map(style => {
|
||||
return `<link rel="stylesheet" class="code-user-style" data-source="${style.replace(/"/g, '"')}" href="${this.fixHref(resource, style)}" type="text/css" media="screen">`;
|
||||
return `<link rel="stylesheet" class="code-user-style" data-source="${style.replace(/"/g, '"')}" href="${this.fixHref(resource, style).replace(/"/g, '"')}" type="text/css" media="screen">`;
|
||||
}).join('\n');
|
||||
}
|
||||
return '';
|
||||
|
|
Loading…
Reference in a new issue