diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index 542fe7d123311bc7eaff661ac777e284d6639965..44fca7b0f5cdfd985171d1f654e5198af1c31bd9 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -310,7 +310,7 @@ class DecorationRenderHelper { cssTextArr.push(strings.format(this._CSS_MAP.contentIconPath, opts.contentIconPath.toString(true).replace(/'/g, '%27'))); } if (typeof opts.contentText !== 'undefined') { - let escaped = opts.contentText.replace(/\"/g, '\\\"'); + const escaped = opts.contentText.replace(/'/g, '\\\''); cssTextArr.push(strings.format(this._CSS_MAP.contentText, escaped)); } DecorationRenderHelper.collectCSSText(opts, ['textDecoration', 'color', 'backgroundColor', 'margin'], cssTextArr);