Backend half
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Escapes characters that can not be in an XML attribute.
|
||||
*/
|
||||
function escapeAttribute(value) {
|
||||
return value.replace(/&/g, '&').replace(/'/g, ''').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
||||
}
|
||||
|
||||
/**
|
||||
* @api private
|
||||
*/
|
||||
module.exports = {
|
||||
escapeAttribute: escapeAttribute
|
||||
};
|
||||
Reference in New Issue
Block a user