diff options
Diffstat (limited to 'spec/frontend/content_editor/remark_markdown_processing_spec.js')
-rw-r--r-- | spec/frontend/content_editor/remark_markdown_processing_spec.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/frontend/content_editor/remark_markdown_processing_spec.js b/spec/frontend/content_editor/remark_markdown_processing_spec.js index 927a7d59899..3d4d5b13120 100644 --- a/spec/frontend/content_editor/remark_markdown_processing_spec.js +++ b/spec/frontend/content_editor/remark_markdown_processing_spec.js @@ -1337,13 +1337,13 @@ content alert("Hello world") </script> `, - expectedHtml: '<p></p>', + expectedHtml: '<p dir="auto"></p>', }, { markdown: ` <foo>Hello</foo> `, - expectedHtml: '<p></p>', + expectedHtml: '<p dir="auto"></p>', }, { markdown: ` @@ -1356,7 +1356,7 @@ alert("Hello world") <a id="link-id">Header</a> and other text `, expectedHtml: - '<p><a target="_blank" rel="noopener noreferrer nofollow">Header</a> and other text</p>', + '<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow">Header</a> and other text</p>', }, { markdown: ` @@ -1366,11 +1366,11 @@ body { } </style> `, - expectedHtml: '<p></p>', + expectedHtml: '<p dir="auto"></p>', }, { markdown: '<div style="transform">div</div>', - expectedHtml: '<div><p>div</p></div>', + expectedHtml: '<div><p dir="auto">div</p></div>', }, ])( 'removes unknown tags and unsupported attributes from HTML output', @@ -1421,6 +1421,7 @@ body { }; }; + // NOTE: unicode \u001 and \u003 cannot be used in test names because they cause test report XML parsing errors it.each` desc | urlInput | urlOutput ${'protocol-based JS injection: simple, no spaces'} | ${protocolBasedInjectionSimpleNoSpaces} | ${null} @@ -1439,7 +1440,7 @@ body { ${'protocol-based JS injection: preceding colon'} | ${":javascript:alert('XSS');"} | ${":javascript:alert('XSS');"} ${'protocol-based JS injection: null char'} | ${"java\0script:alert('XSS')"} | ${"java�script:alert('XSS')"} ${'protocol-based JS injection: invalid URL char'} | ${"java\\script:alert('XSS')"} | ${"java\\script:alert('XSS')"} - `('sanitize $desc:\n\tURL "$urlInput" becomes "$urlOutput"', ({ urlInput, urlOutput }) => { + `('sanitize $desc becomes "$urlOutput"', ({ urlInput, urlOutput }) => { const exampleFactories = [docWithImageFactory, docWithLinkFactory]; exampleFactories.forEach(async (exampleFactory) => { |