Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -110,14 +110,17 @@ def render_message(history):
|
|
| 110 |
messages_html += """
|
| 111 |
</div></div>
|
| 112 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/dompurify/2.3.3/purify.min.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
"""
|
| 114 |
return messages_html
|
| 115 |
|
| 116 |
|
| 117 |
js = """
|
| 118 |
function HTMLClean() {
|
| 119 |
-
|
| 120 |
-
document.getElementById("output").innerHTML = cleanHTML;
|
| 121 |
}
|
| 122 |
"""
|
| 123 |
|
|
|
|
| 110 |
messages_html += """
|
| 111 |
</div></div>
|
| 112 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/dompurify/2.3.3/purify.min.js"></script>
|
| 113 |
+
<script>
|
| 114 |
+
var cleanHTML = DOMPurify.sanitize(userInputHTML);
|
| 115 |
+
document.getElementById("output").innerHTML = cleanHTML;
|
| 116 |
+
</script>
|
| 117 |
"""
|
| 118 |
return messages_html
|
| 119 |
|
| 120 |
|
| 121 |
js = """
|
| 122 |
function HTMLClean() {
|
| 123 |
+
alert("This page is in-dev stage, expect lots of restarts, the interface is open-sourced (not the backend that is responsible for API Keys)")
|
|
|
|
| 124 |
}
|
| 125 |
"""
|
| 126 |
|