YARN-3589. RM and AH web UI display DOCTYPE wrongly. Contbituted by Rohith.
This commit is contained in:
parent
fd605997ee
commit
f26700f287
|
@ -344,6 +344,8 @@ Release 2.8.0 - UNRELEASED
|
||||||
|
|
||||||
YARN-3592. Fix typos in RMNodeLabelsManager. (Sunil G via devaraj)
|
YARN-3592. Fix typos in RMNodeLabelsManager. (Sunil G via devaraj)
|
||||||
|
|
||||||
|
YARN-3589. RM and AH web UI display DOCTYPE wrongly. (Rohith via ozawa)
|
||||||
|
|
||||||
Release 2.7.1 - UNRELEASED
|
Release 2.7.1 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -78,7 +78,7 @@ public abstract class HtmlPage extends TextView {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render() {
|
public void render() {
|
||||||
puts(DOCTYPE);
|
putWithoutEscapeHtml(DOCTYPE);
|
||||||
render(page().html().meta_http("X-UA-Compatible", "IE=8")
|
render(page().html().meta_http("X-UA-Compatible", "IE=8")
|
||||||
.meta_http("Content-type", MimeType.HTML));
|
.meta_http("Content-type", MimeType.HTML));
|
||||||
if (page().nestLevel() != 0) {
|
if (page().nestLevel() != 0) {
|
||||||
|
|
|
@ -40,7 +40,7 @@ public abstract class TextView extends View {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print strings as is (no newline, a la php echo).
|
* Print strings escaping html.
|
||||||
* @param args the strings to print
|
* @param args the strings to print
|
||||||
*/
|
*/
|
||||||
public void echo(Object... args) {
|
public void echo(Object... args) {
|
||||||
|
@ -52,6 +52,17 @@ public abstract class TextView extends View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print strings as is (no newline, a la php echo).
|
||||||
|
* @param args the strings to print
|
||||||
|
*/
|
||||||
|
public void echoWithoutEscapeHtml(Object... args) {
|
||||||
|
PrintWriter out = writer();
|
||||||
|
for (Object s : args) {
|
||||||
|
out.print(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print strings as a line (new line appended at the end, a la C/Tcl puts).
|
* Print strings as a line (new line appended at the end, a la C/Tcl puts).
|
||||||
* @param args the strings to print
|
* @param args the strings to print
|
||||||
|
@ -60,4 +71,13 @@ public abstract class TextView extends View {
|
||||||
echo(args);
|
echo(args);
|
||||||
writer().println();
|
writer().println();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print string as a line. This does not escapes the string for html
|
||||||
|
* @param args the strings to print
|
||||||
|
*/
|
||||||
|
public void putWithoutEscapeHtml(Object args) {
|
||||||
|
echoWithoutEscapeHtml(args);
|
||||||
|
writer().println();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue