Aleksandr Efimov has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/24453


Change subject: IMPALA-15096: Do not escape raw text profiles
......................................................................

IMPALA-15096: Do not escape raw text profiles

Text profiles downloaded from the WebUI are served through raw_text.tmpl
after setting Webserver::ENABLE_RAW_HTML_KEY. The template still used
escaped Mustache substitution, so profile text with characters such as
'<', '>', and apostrophes was downloaded with HTML entities.

Render contents unescaped only when __raw__ is present. This preserves
escaped output for non-raw users of the template. Add tests for raw and
non-raw rendering.

Testing:
- python3 bin/jenkins/critique-gerrit-review.py --dryrun
- git diff --check -- be/src/util/webserver-test.cc www/raw_text.tmpl
- Verified html.unescape(rf_profile_web.txt) matches rf_profile.txt
  using the IMPALA-15096 attachments
- Kubernetes:
  - ninja java
  - bin/run-jvm-binary.sh be/build/latest/util/webserver-test with a
    gtest filter for RawTextTemplateDoesNotEscapeRawContents and
    RawTextTemplateEscapesNonRawContents

Change-Id: I07965b7c550af6d136e4c343da84f77374e236ed
---
M be/src/util/webserver-test.cc
M www/raw_text.tmpl
2 files changed, 53 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/53/24453/1
--
To view, visit http://gerrit.cloudera.org:8080/24453
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I07965b7c550af6d136e4c343da84f77374e236ed
Gerrit-Change-Number: 24453
Gerrit-PatchSet: 1
Gerrit-Owner: Aleksandr Efimov <[email protected]>

Reply via email to