Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for test_swagger_ui_parameters_html_chars_are_escaped (0.89 seconds)

  1. tests/test_swagger_ui_escape.py

        )
        body = html.body.decode()
    
        assert "</script><script>" not in body
        assert "\\u003c/script\\u003e\\u003cscript\\u003e" in body
    
    
    def test_swagger_ui_parameters_html_chars_are_escaped():
        html = get_swagger_ui_html(
            openapi_url="/openapi.json",
            title="Test",
            swagger_ui_parameters={"customKey": "<img src=x onerror=alert(1)>"},
        )
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 24 09:28:10 GMT 2026
    - 1.1K bytes
    - Click Count (0)
Back to Top