mirror of
https://github.com/samsonjs/mit-license.git
synced 2026-04-25 14:47:41 +00:00
Largly just a code reorg taking all of @Richienb's work and splitting it into separate files.
7 lines
207 B
JavaScript
7 lines
207 B
JavaScript
const tags = {
|
|
'<': '<',
|
|
'>': '>',
|
|
'&': '&',
|
|
};
|
|
exports.escapeTags = str => (str || '').replace(/[<>&]/g, m => tags[m]);
|
|
exports.stripTags = str => (str || '').replace(/<(?:.|\n)*?>/gm, '');
|