12345678910111213141516 |
- 'use strict';
- const Assert = require('./assert');
- const internals = {};
- module.exports = function (attribute) {
-
- Assert(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(attribute), 'Bad attribute value (' + attribute + ')');
- return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"');
- };
|