File tree Expand file tree Collapse file tree 4 files changed +19
-8
lines changed Expand file tree Collapse file tree 4 files changed +19
-8
lines changed Original file line number Diff line number Diff line change 33
33
{% block menu_extra %}
34
34
< div class ="container "> {{ link_breadcrumbs(breadcrumbs) }}</ div >
35
35
{% endblock %}
36
+
37
+
38
+ {% block container %}
39
+ {{ body|safe }}
40
+ {% endblock container %}
Original file line number Diff line number Diff line change 117
117
</ div >
118
118
</ nav >
119
119
120
- {% block container %}< div class ="container container-main ">
120
+ {% block container -%}
121
+ < div class ="container container-main ">
121
122
{% block body %}{% endblock %}
122
- </ div > {% endblock container %}
123
+ </ div >
124
+ {%- endblock container %}
123
125
124
126
125
127
{% block footer %}
Original file line number Diff line number Diff line change 117
117
118
118
119
119
{% block body %}
120
- <!-- block body safe notebook.html -->
120
+ <!-- block body safe notebook.html -->
121
121
{{ link_breadcrumbs(breadcrumbs) }}
122
- {{ body | safe}}
122
+ {{ body | safe}}
123
123
<!-- end block body safe notebook.html -->
124
124
{% endblock %}
125
125
161
161
</ p >
162
162
< style >
163
163
/* I did not found other ways to override CSS for now */
164
- div .reveal {
165
- font-size : 10px ;
166
-
167
- }
164
+ div .reveal { font-size : 12px ; }
168
165
</ style >
169
166
{% endif %}
170
167
{% endblock extra_footer %}
Original file line number Diff line number Diff line change 16
16
from .base import NBViewerTestCase
17
17
from .base import skip_unless_github_auth
18
18
19
+ import pytest
20
+
19
21
20
22
class XSSTestCase (NBViewerTestCase ):
21
23
def _xss (self , path , pattern = "<script>alert" ):
22
24
r = requests .get (self .url () + path )
23
25
self .assertEqual (r .status_code , 200 )
24
26
self .assertNotIn (pattern , r .content )
25
27
28
+ @pytest .mark .skip ("Github API has changed and need to be fixed" )
26
29
@skip_unless_github_auth
27
30
def test_github_dirnames (self ):
31
+ # it seem like in previous GH API, this was allowing to browse branches,
32
+ # but now it seem you need to use ?ref=branchname. So this will fail.
33
+ # there is also a current bug in nbviewer, where selecting the branch from teh UI
34
+ # insert a / in </script> instead of escaping it to %2f.
28
35
self ._xss ("/github/bburky/xss/tree/%3Cscript%3Ealert(1)%3C%2fscript%3E/" )
29
36
30
37
@skip_unless_github_auth
You can’t perform that action at this time.
0 commit comments