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 20:39:57 -0400
commit9f3f0059042350b076032894ad77f60fcd801a5a (patch)
treee45b424f89afccdea37b3947e4462fe03b1bb861 /spec
parent34d086f3e14eecf3bfdcf766f7b3499bd3aad47b (diff)
downloadgitlab-ce-9f3f0059042350b076032894ad77f60fcd801a5a.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 16ad0d456be..776da128a47 100644
--- a/spec/features/markdown/math_spec.rb
+++ b/spec/features/markdown/math_spec.rb
@@ -32,7 +32,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