1234567891011121314151617181920212223 |
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = escape;
- /*
- * @flow
- */
- const encoded = {
- '&': '&',
- '<': '<',
- '>': '>',
- '/': '/',
- "'": ''',
- '"': '"'
- };
- function escape(str /*: string*/) /*: string*/{
- return str.replace(/[&<>\/'"]/g, function (char) {
- return encoded[char];
- });
- }
|