mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
don't over-encode, do try to decode, fixes #85521
This commit is contained in:
@@ -289,16 +289,23 @@ export namespace MarkdownString {
|
||||
if (!data) {
|
||||
return part;
|
||||
}
|
||||
let changed = false;
|
||||
data = cloneAndChange(data, value => {
|
||||
if (URI.isUri(value)) {
|
||||
const key = `__uri_${Math.random().toString(16).slice(2, 8)}`;
|
||||
bucket[key] = value;
|
||||
changed = true;
|
||||
return key;
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
});
|
||||
return encodeURIComponent(JSON.stringify(data));
|
||||
|
||||
if (!changed) {
|
||||
return part;
|
||||
}
|
||||
|
||||
return JSON.stringify(data);
|
||||
}
|
||||
|
||||
export function to(value: htmlContent.IMarkdownString): vscode.MarkdownString {
|
||||
|
||||
Reference in New Issue
Block a user