Files
weave-scope/client/app/scripts/utils/__tests__/dom-utils-test.js
Roland Schilter 656fbac4e6 Fix rendering of exported SVG (#2794)
Replace invalid characters in attribute value; fixes the error

        Unescaped '<' not allowed in attributes values

Fixes #2534
2017-08-08 10:04:22 +01:00

16 lines
426 B
JavaScript

import { encodeIdAttribute, decodeIdAttribute } from '../dom-utils';
describe('DomUtils', () => {
describe('encodeIdAttribute/decodeIdAttribute', () => {
it('encode should be reversible by decode ', () => {
[
'123-abc;<foo>',
';;<<><>',
'!@#$%^&*()+-\'"',
].forEach((input) => {
expect(decodeIdAttribute(encodeIdAttribute(input))).toEqual(input);
});
});
});
});