Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Code Hints API is confusing about HTML escaping #7217

@peterflynn

Description

@peterflynn

The Code Hints extensibility API has some confusing semantics, mainly driven by the code in CodeHintList._buildListView():

  • If you provide a match property, it assumes you're providing strings and not jQuery objects -- this is probably sensible, but it's not documented anywhere.
  • If you provide strings, it assumes they're already HTML-escaped. This is undocumented, and confusing since we already support jQuery objects if you want to provide formatted output.
  • If there is HTML markup or escaping in the string you provide, and you also provide match, it's possible for the match-text to match something in the HTML part of the string -- so the match-bolding logic will break the HTML code.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions