added doga

This commit is contained in:
szabomarton
2025-02-25 09:55:29 +01:00
parent 5174ab4cc4
commit 13254e5623
1149 changed files with 80161 additions and 0 deletions

13
25_02_24/node_modules/es-escape-html/src/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
/**
* Escape special characters in the given string of text, such that it can be interpolated in HTML content.
* This function will escape the following characters: `"`, `'`, `&`, `<`, and `>`.
*
* *Note* that the escaped value is only suitable for being interpolated into HTML as the text content of
* elements in which the tag does not have different escaping mechanisms (it cannot be placed inside
* `<style>` or `<script>`, for example, as those content bodies are not HTML, but CSS and JavaScript,
* respectively; these are known as "raw text elements" in the HTML standard).
*
* *Note* when using the escaped value within a tag, it is only suitable as the value of an attribute,
* where the value is quoted with either a double quote character (`"`) or a single quote character (`'`).
*/
export declare function escapeHTML(text: string): string;

61
25_02_24/node_modules/es-escape-html/src/index.js generated vendored Normal file
View File

@@ -0,0 +1,61 @@
const matchHtmlRegExp = /["'&<>]/;
/**
* Escape special characters in the given string of text, such that it can be interpolated in HTML content.
* This function will escape the following characters: `"`, `'`, `&`, `<`, and `>`.
*
* *Note* that the escaped value is only suitable for being interpolated into HTML as the text content of
* elements in which the tag does not have different escaping mechanisms (it cannot be placed inside
* `<style>` or `<script>`, for example, as those content bodies are not HTML, but CSS and JavaScript,
* respectively; these are known as "raw text elements" in the HTML standard).
*
* *Note* when using the escaped value within a tag, it is only suitable as the value of an attribute,
* where the value is quoted with either a double quote character (`"`) or a single quote character (`'`).
*
* @param {string} str The string to escape for inserting into HTML
* @return {string}
* @public
*/
export function escapeHTML(str) {
const match = matchHtmlRegExp.exec(str);
if (!match) {
return str;
}
let escape;
let html = "";
let index = 0;
let lastIndex = 0;
for (index = match.index; index < str.length; index++) {
switch (str.charCodeAt(index)) {
case 34: // "
escape = "&quot;";
break;
case 38: // &
escape = "&amp;";
break;
case 39: // '
escape = "&#39;";
break;
case 60: // <
escape = "&lt;";
break;
case 62: // >
escape = "&gt;";
break;
default:
continue;
}
if (lastIndex !== index) {
html += str.substring(lastIndex, index);
}
lastIndex = index + 1;
html += escape;
}
return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
}