Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -222,9 +222,12 @@ def generate_interactive_lesson(text, video_path):
|
|
| 222 |
</html>
|
| 223 |
"""
|
| 224 |
|
| 225 |
-
#
|
|
|
|
|
|
|
|
|
|
| 226 |
open_button_html = f"""
|
| 227 |
-
<button onclick="var w = window.open(); w.document.write(`{
|
| 228 |
"""
|
| 229 |
|
| 230 |
return open_button_html
|
|
|
|
| 222 |
</html>
|
| 223 |
"""
|
| 224 |
|
| 225 |
+
# Экранируем специальные символы вне f-строки
|
| 226 |
+
escaped_html = html.replace('`', r'\`').replace('$', r'\$')
|
| 227 |
+
|
| 228 |
+
# HTML для кнопки открытия в новой вкладке
|
| 229 |
open_button_html = f"""
|
| 230 |
+
<button onclick="var w = window.open(); w.document.write(`{escaped_html}`);">Интерактивті сабақты жаңа қойындыда ашу</button>
|
| 231 |
"""
|
| 232 |
|
| 233 |
return open_button_html
|