vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

HTML special characters not escaped in documentation tooltips

Open abustany opened this issue 5 years ago • 1 comments

Describe the bug

If a JSON schema contains HTML characters (eg. <span>foo</span>) in the description field, those are not escaped before being handed over to VS Code, which apparently interprets them (probably to offer rich formatting).

Extension version: 0.11.1

Expected Behavior

HTML special chars like < get replaced by their entites (&lt;) before being passed to VS Code

Current Behavior

HTML special chars are passed directly to VS Code.

This could actually be considered a feature, but I don't know if other tools reading the schema (eg. doc generators) play well with that...

Steps to Reproduce

  1. Write a schema with <span>hello</span> in the description field
  2. Hover a term in a YAML doc to invoke the documentation tooltip

Environment

  • [ ] Windows
  • [ ] Mac
  • [x] Linux
  • [ ] other (please specify)

abustany avatar Oct 20 '20 10:10 abustany

@JPinkney I do some investigation on this, we completely rely on vscode-json-languageservice on hover feature, for json files has same hover content. I think that we need to address this issue to them.

evidolob avatar Nov 19 '20 08:11 evidolob