"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"X-Requested-With": "XMLHttpRequest",
"X-XSRF-TOKEN": Core.getXsrfToken(),
- "Accept": "application/json",
+ Accept: "application/json",
},
body: Core.serialize(body),
mode: "same-origin",
* @since 6.0
*/
escapeAttributeSelector(selector) {
- return selector.replace(/(["\\])/g, '\\$1');
+ return selector.replace(/(["\\])/g, "\\$1");
},
/**
* Returns the element's id. If there is no id set, a unique id will be
* Escapes special HTML-characters within a string
*/
function escapeHTML(string) {
- return String(string).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
+ return String(string)
+ .replace(/&/g, "&")
+ .replace(/"/g, """)
+ .replace(/'/g, "'")
+ .replace(/</g, "<")
+ .replace(/>/g, ">");
}
exports.escapeHTML = escapeHTML;
/**