escapeChars.js 419 B

12345678910111213141516171819
  1. /* We're explicitly defining the list of entities we want to escape.
  2. nbsp is an HTML entity, but we don't want to escape all space characters in a string, hence its omission in this map.
  3. */
  4. var escapeChars = {
  5. '¢' : 'cent',
  6. '£' : 'pound',
  7. '¥' : 'yen',
  8. '€': 'euro',
  9. '©' :'copy',
  10. '®' : 'reg',
  11. '<' : 'lt',
  12. '>' : 'gt',
  13. '"' : 'quot',
  14. '&' : 'amp',
  15. '\'' : '#39'
  16. };
  17. module.exports = escapeChars;