Ensure that debuglog search queries are escaped.

Thank you to Aref Alotaibi <arefalotaibi.cs@gmail.com> for discovering
and reporting this issue!
This commit is contained in:
Greyson Parrelli
2025-08-25 15:51:33 -04:00
committed by Michelle Tang
parent 7bb0b513e8
commit dde1d9b2c8

View File

@@ -88,7 +88,8 @@ object DebugLogsViewer {
@JvmStatic
fun onSearchInput(webview: WebView, query: String) {
webview.evaluateJavascript("onSearchInput('$query')", null)
val escaped = JSONObject.quote(query)
webview.evaluateJavascript("onSearchInput($escaped)", null)
}
@JvmStatic