Skip to content
This repository
  • 6 commits
  • 4 files changed
  • 0 comments
  • 5 contributors
2  README.rst
Source Rendered
@@ -12,4 +12,4 @@ It is a Django_ application.
12 12 .. _Django: http://www.djangoproject.com/
13 13
14 14
15   -You can access the staging site at https:/developer.allizom.org/
  15 +You can access the staging site at https://developer.allizom.org/
3  apps/wiki/models.py
@@ -374,8 +374,7 @@ def clean_content(self, content_in, use_constance_bleach_whitelists=False):
374 374 styles = ALLOWED_STYLES
375 375
376 376 out = bleach.clean(out, attributes=attributes, tags=tags,
377   - styles=styles, strip_comments=False,
378   - skip_gauntlet=True)
  377 + styles=styles, skip_gauntlet=True)
379 378 return out
380 379
381 380 def get_by_natural_key(self, locale, slug):
15 apps/wiki/tests/test_content.py
@@ -777,6 +777,21 @@ def test_allowed_attributes(self):
777 777 eq_(html_str, bleach.clean(html_str, attributes=ALLOWED_ATTRIBUTES,
778 778 tags=ALLOWED_TAGS))
779 779
  780 + def test_stripped_ie_comment(self):
  781 + """bug 801046: strip IE conditional comments"""
  782 + content = """
  783 + <p>Hi there.</p>
  784 + <!--[if]><script>alert(1)</script -->
  785 + <!--[if<img src=x onerror=alert(2)//]> -->
  786 + <p>Goodbye</p>
  787 + """
  788 + expected = """
  789 + <p>Hi there.</p>
  790 + <p>Goodbye</p>
  791 + """
  792 + result = Document.objects.clean_content(content)
  793 + eq_(normalize_html(expected), normalize_html(result))
  794 +
780 795
781 796 class GetSEODescriptionTests(TestCase):
782 797
6 media/syntaxhighlighter/styles/shThemeDefault.css
@@ -36,10 +36,10 @@
36 36 color: #afafaf !important;
37 37 }
38 38 .syntaxhighlighter .gutter .line {
39   - border-right: 3px solid #6ce26c !important;
  39 + border-right: 3px solid #e5e5e5 !important;
40 40 }
41 41 .syntaxhighlighter .gutter .line.highlighted {
42   - background-color: #6ce26c !important;
  42 + background-color: #e5e5e5 !important;
43 43 color: white !important;
44 44 }
45 45 .syntaxhighlighter.printing .line .content {
@@ -51,7 +51,7 @@
51 51 .syntaxhighlighter.collapsed .toolbar {
52 52 color: blue !important;
53 53 background: white !important;
54   - border: 1px solid #6ce26c !important;
  54 + border: 1px solid #e5e5e5 !important;
55 55 }
56 56 .syntaxhighlighter.collapsed .toolbar a {
57 57 color: blue !important;

No commit comments for this range

Something went wrong with that request. Please try again.