Commit
·
6ca2db5
1
Parent(s):
a513351
Fix terminal color rendering: remove HTML escaping
Browse files- Removed html.escape() call that was converting <span> tags to <span> text
- Terminal colors should now render properly instead of showing raw HTML tags
- colorize_output() function already creates safe HTML spans
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
app.py
CHANGED
|
@@ -1107,15 +1107,14 @@ def create_dashboard():
|
|
| 1107 |
def run_and_clear(cmd, output, history):
|
| 1108 |
new_output, _, new_history = run_vm_command(cmd, output, history)
|
| 1109 |
|
| 1110 |
-
#
|
| 1111 |
-
|
| 1112 |
-
escaped_output = html.escape(new_output)
|
| 1113 |
|
| 1114 |
# Create a unique ID for this update to force refresh
|
| 1115 |
unique_id = f"terminal-{hash(new_output) % 100000}"
|
| 1116 |
|
| 1117 |
html_output = f'''<div class="terminal-display">
|
| 1118 |
-
<pre id="{unique_id}" style="margin: 0; font-family: inherit; color: inherit; background: inherit; white-space: pre-wrap; word-wrap: break-word;">{
|
| 1119 |
</div>
|
| 1120 |
<script>
|
| 1121 |
// Force immediate scroll to top by targeting multiple elements
|
|
|
|
| 1107 |
def run_and_clear(cmd, output, history):
|
| 1108 |
new_output, _, new_history = run_vm_command(cmd, output, history)
|
| 1109 |
|
| 1110 |
+
# DON'T escape HTML since we want color spans to render
|
| 1111 |
+
# The colorize_output function already creates safe HTML spans
|
|
|
|
| 1112 |
|
| 1113 |
# Create a unique ID for this update to force refresh
|
| 1114 |
unique_id = f"terminal-{hash(new_output) % 100000}"
|
| 1115 |
|
| 1116 |
html_output = f'''<div class="terminal-display">
|
| 1117 |
+
<pre id="{unique_id}" style="margin: 0; font-family: inherit; color: inherit; background: inherit; white-space: pre-wrap; word-wrap: break-word;">{new_output}</pre>
|
| 1118 |
</div>
|
| 1119 |
<script>
|
| 1120 |
// Force immediate scroll to top by targeting multiple elements
|