mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 05:37:20 +08:00
fix(cli): escape action content before passing to HTML (#11333)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import html
|
||||
from prompt_toolkit import HTML, print_formatted_text
|
||||
|
||||
from openhands.sdk.security.confirmation_policy import (
|
||||
@@ -37,7 +38,7 @@ def ask_user_confirmation(
|
||||
or '[unknown action]'
|
||||
)
|
||||
print_formatted_text(
|
||||
HTML(f'<grey> {i}. {tool_name}: {action_content}...</grey>')
|
||||
HTML(f'<grey> {i}. {tool_name}: {html.escape(action_content)}...</grey>')
|
||||
)
|
||||
|
||||
question = 'Choose an option:'
|
||||
|
||||
Reference in New Issue
Block a user