/** * Wraps matching portions of `text` in tags for visual highlighting. * Escapes HTML to prevent XSS. * * Matching runs on the RAW text and escaping happens per segment afterwards. * The old escape-first order had two failure modes on text containing * `& < > " '`: a search term with one of those characters could never match * its own escaped text ("AT&T" vs "AT&T"), and a term like "amp" or "lt" * matched INSIDE an entity, splitting it with and corrupting the * rendered output. */ export declare function highlightText(text: string, search: string): string;