Skip to content
Snippets Groups Projects
Commit 48d2027c authored by syuilo's avatar syuilo
Browse files

add some tests

parent c7b6579e
No related branches found
No related tags found
1 merge request!1push develop into stable
......@@ -1028,6 +1028,14 @@ hoge`;
];
assert.deepStrictEqual(mfm.parse(input), output);
});
it('prevent xss', () => {
const input = 'javascript:foo';
const output = [
TEXT('javascript:foo')
];
assert.deepStrictEqual(mfm.parse(input), output);
});
});
describe('link', () => {
......@@ -1064,6 +1072,14 @@ hoge`;
assert.deepStrictEqual(mfm.parse(input), output);
});
it('prevent xss', () => {
const input = '[click here](javascript:foo)';
const output = [
TEXT('[click here](javascript:foo)')
];
assert.deepStrictEqual(mfm.parse(input), output);
});
describe('cannot nest a url in a link label', () => {
it('basic', () => {
const input = 'official instance: [https://misskey.io/@ai](https://misskey.io/@ai).';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment