/ cloudformation-templates / node_modules / aws-cdk / node_modules / aws-sdk / lib / xml / escape-attribute.js
escape-attribute.js
1 /** 2 * Escapes characters that can not be in an XML attribute. 3 */ 4 function escapeAttribute(value) { 5 return value.replace(/&/g, '&').replace(/'/g, ''').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); 6 } 7 8 /** 9 * @api private 10 */ 11 module.exports = { 12 escapeAttribute: escapeAttribute 13 };