Skip to content

Instantly share code, notes, and snippets.

@bohman
Created May 11, 2011 11:00
Show Gist options
  • Save bohman/966282 to your computer and use it in GitHub Desktop.
Save bohman/966282 to your computer and use it in GitHub Desktop.
Just a small thing I wanted to show someone else. I dislike it, because it's bad.
.replace(/<(?:.|\s)*?>/g, '')
.replace(/&auml;/gi, 'ä')
.replace(/&Auml;/gi, 'Ä')
.replace(/&ouml;/gi, 'ö')
.replace(/&Ouml;/gi, 'Ö')
.replace(/&aring;/gi, 'å')
.replace(/&Aring;/gi, 'Å')
.replace(/&amp;/gi, '&')
.replace(/&rdquo;/gi, '\"')
.replace(/&quot;/gi, '\"')
.replace(/&ndash;/gi, '-')
@bohman
Copy link
Author

bohman commented May 11, 2011

Intressant. Ska testa! Tack för tipset :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment