@mediarithmics/plugins-nodejs-sdk
Version:
This is the mediarithmics nodejs to help plugin developers bootstrapping their plugin without having to deal with most of the plugin boilerplate
18 lines (14 loc) • 297 B
text/typescript
// Sourced from Handlebars
export const escape: any = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'",
"`": "`",
"=": "="
};
export const badChars = /[&<>"'`=]/g;
export function escapeChar(chr: string): string {
return escape[chr] as string;
}