diff options
author | Stan Hu <stanhu@gmail.com> | 2019-07-23 16:42:42 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-07-23 21:40:09 +0300 |
commit | e1219ad44e553f3472faddce559ea9f92f64240e (patch) | |
tree | 42bd619dcb16da75dbc54e836d94dfad0d63d04e /spec/features/issues | |
parent | b5cc47bda6cefc1aa75e9e388f656609246ca326 (diff) |
Update Mermaid to v8.2.3
This fixes fill colors not working with Mermaid and pulls
in a number of other fixes.
* https://github.com/knsv/mermaid/blob/master/CHANGELOG.md
* https://github.com/knsv/mermaid/#special-note-regarding-version-82
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64601
Diffstat (limited to 'spec/features/issues')
-rw-r--r-- | spec/features/issues/user_comments_on_issue_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/features/issues/user_comments_on_issue_spec.rb b/spec/features/issues/user_comments_on_issue_spec.rb index b4b9a589ba3..4b29f6ee42a 100644 --- a/spec/features/issues/user_comments_on_issue_spec.rb +++ b/spec/features/issues/user_comments_on_issue_spec.rb @@ -41,16 +41,17 @@ describe "User comments on issue", :js do expect(page.find('pre code').text).to eq code_block_content end - it "does not render html content in mermaid" do + it "renders escaped HTML content in Mermaid" do html_content = "<img onerror=location=`javascript\\u003aalert\\u0028document.domain\\u0029` src=x>" mermaid_content = "graph LR\n B-->D(#{html_content});" + escaped_content = CGI.escapeHTML(html_content).gsub('=', "=") comment = "```mermaid\n#{mermaid_content}\n```" add_note(comment) wait_for_requests - expect(page.find('svg.mermaid')).to have_content html_content + expect(page.find('svg.mermaid')).to have_content escaped_content end end |