forked from FINAKON/HelpProject
1. Initial Commit - a boiler plate code and POC to realize the concept of context sensitive help 2. Frontend code written in ReactJS 3. Backend code written in Java, Spring Boot Framework 4. Frontend Start: pre-requisites : node, npm npm run dev ==> to start the frontend vite server 5. Backend Start: pre-requisites : java, mvn mvn spring-boot:run ==> to start the backend server 6. Visit http://localhost:5173/ for basic demo of help, press F1 in textboxes 7. Visit http://localhost:5173/editor and enter "admin123" to add/modify texts. Happy Coding !!! Thank you, Bhargava.
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
/**
|
|
* Make a value safe for injection as a URL.
|
|
*
|
|
* This encodes unsafe characters with percent-encoding and skips already
|
|
* encoded sequences (see `normalizeUri`).
|
|
* Further unsafe characters are encoded as character references (see
|
|
* `micromark-util-encode`).
|
|
*
|
|
* A regex of allowed protocols can be given, in which case the URL is
|
|
* sanitized.
|
|
* For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`, or
|
|
* `/^https?$/i` for `img[src]` (this is what `github.com` allows).
|
|
* If the URL includes an unknown protocol (one not matched by `protocol`, such
|
|
* as a dangerous example, `javascript:`), the value is ignored.
|
|
*
|
|
* @param {string | null | undefined} url
|
|
* URI to sanitize.
|
|
* @param {RegExp | null | undefined} [protocol]
|
|
* Allowed protocols.
|
|
* @returns {string}
|
|
* Sanitized URI.
|
|
*/
|
|
export function sanitizeUri(url: string | null | undefined, protocol?: RegExp | null | undefined): string;
|
|
/**
|
|
* Normalize a URL.
|
|
*
|
|
* Encode unsafe characters with percent-encoding, skipping already encoded
|
|
* sequences.
|
|
*
|
|
* @param {string} value
|
|
* URI to normalize.
|
|
* @returns {string}
|
|
* Normalized URI.
|
|
*/
|
|
export function normalizeUri(value: string): string;
|
|
//# sourceMappingURL=index.d.ts.map
|