huaxingao opened a new pull request, #57188: URL: https://github.com/apache/spark/pull/57188
### What changes were proposed in this pull request? The log viewer pages assemble a query string from request parameters and embed it into an inline script literal. Encode that value for a JavaScript string context using the bundled commons-text StringEscapeUtils, matching the existing pattern in AllJobsPage, so the generated script stays well-formed regardless of the parameter contents. Also sanitize the parameters on the client side in log-view.js, and add a regression test. Backport to 4.2 of https://github.com/apache/spark/pull/57165 ### Why are the changes needed? Formatting can get funky with unescaped parameters. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? New test ### Was this patch authored or co-authored using generative AI tooling? Primarily Claude 4.8 Closes #57166 from holdenk/log-page-encode-4.x. Lead-authored-by: Claude <Holden's Claude Robot [email protected]> (cherry picked from commit 2f75218fb6ad63c40bc48057f2a03ff39e6f1f5f) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
