1/*--------------------------------------------------------------------------------------------- 2 * Copyright (c) Microsoft Corporation. All rights reserved. 3 * Licensed under the MIT License. See License.txt in the project root for license information. 4 *--------------------------------------------------------------------------------------------*/ 5import * as vscode from 'vscode'; 6 7export function escapeAttribute(value: string | vscode.Uri): string { 8 return value.toString() 9 .replace(/&/g, '&') 10 .replace(/"/g, '"') 11 .replace(/'/g, '''); 12} 13 14 15