summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMartin Hanzel <arthanzel@gmail.com>2019-07-24 14:19:25 +0200
committerMartin Hanzel <arthanzel@gmail.com>2019-08-06 19:19:02 -0400
commit20e8c92410d93c39f4a800941d0c633f949e7790 (patch)
tree6d4b5310609335cd39a648083a1870540c4955da /spec
parent1dfbb27f6e8d01023564eededff2a0ba1a04badc (diff)
downloadgitlab-ce-20e8c92410d93c39f4a800941d0c633f949e7790.tar.gz
Enforce max chars and max render time in markdown math
KaTeX math will now render progressivly and asynchronously. There are upper limits on the character count of each formula, and on cumulative render time.
Diffstat (limited to 'spec')
-rw-r--r--spec/features/markdown/math_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/features/markdown/math_spec.rb b/spec/features/markdown/math_spec.rb
index 68d99b4241a..76eef66c517 100644
--- a/spec/features/markdown/math_spec.rb
+++ b/spec/features/markdown/math_spec.rb
@@ -34,7 +34,9 @@ describe 'Math rendering', :js do
visit project_issue_path(project, issue)
- expect(page).to have_selector('.katex-error', text: "\href{javascript:alert('xss');}{xss}")
- expect(page).to have_selector('.katex-html a', text: 'Gitlab')
+ page.within '.description > .md' do
+ expect(page).to have_selector('.katex-error')
+ expect(page).to have_selector('.katex-html a', text: 'Gitlab')
+ end
end
end