Guest User

Untitled

a guest
Jul 16th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. var map = { amp: '&', lt: '<', gt: '>', quot: '"', '#039': "'"};
  2.  
  3. var output = newsTitle.replace(/&([^;]+);/g, (m, c) => map[c]);
Add Comment
Please, Sign In to add comment