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

Code Hints API is confusing about HTML escaping #7217

Open
peterflynn opened this issue Mar 17, 2014 · 2 comments
Open

Code Hints API is confusing about HTML escaping #7217

peterflynn opened this issue Mar 17, 2014 · 2 comments

Comments

@peterflynn
Copy link
Member

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.
@peterflynn peterflynn added this to the Brackets 1.0 milestone Mar 19, 2014
@peterflynn
Copy link
Member Author

Marking low priority @RaymondLim, but nominating for 1.0 -- would be nice to clean up this API before then.

@pthiess
Copy link
Contributor

pthiess commented May 1, 2014

Reviewed leave the 1.0 milestone. Seems like a small fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants