Update app.py
Browse files
app.py
CHANGED
|
@@ -272,13 +272,12 @@ def send_to_sandbox(code):
|
|
| 272 |
encoded_html = base64.b64encode(code.encode('utf-8')).decode('utf-8')
|
| 273 |
data_uri = f"data:text/html;charset=utf-8;base64,{encoded_html}"
|
| 274 |
return f"""
|
| 275 |
-
<div style="height:800px !important; max-height:800px !important; overflow:hidden !important;">
|
| 276 |
<iframe
|
| 277 |
src="{data_uri}"
|
| 278 |
-
|
| 279 |
-
height="800"
|
| 280 |
-
style="height:800px !important; max-height:800px !important; border:none; overflow:auto;"
|
| 281 |
scrolling="auto"
|
|
|
|
| 282 |
></iframe>
|
| 283 |
</div>
|
| 284 |
"""
|
|
|
|
| 272 |
encoded_html = base64.b64encode(code.encode('utf-8')).decode('utf-8')
|
| 273 |
data_uri = f"data:text/html;charset=utf-8;base64,{encoded_html}"
|
| 274 |
return f"""
|
| 275 |
+
<div class="sandbox-container" style="height:800px !important; max-height:800px !important; overflow:hidden !important;">
|
| 276 |
<iframe
|
| 277 |
src="{data_uri}"
|
| 278 |
+
style="width:100%; height:800px !important; max-height:800px !important; border:none; display:block;"
|
|
|
|
|
|
|
| 279 |
scrolling="auto"
|
| 280 |
+
sandbox="allow-scripts allow-same-origin"
|
| 281 |
></iframe>
|
| 282 |
</div>
|
| 283 |
"""
|