Skip to content

Commit 4fc5990

Browse files
committed
Fix App Identity sample HTML to match Google Style.
Google style expects valid HTML, so I added the missing title and character encoding tags. Also, attributes should use double quotes, not single quotes. https://google.github.io/styleguide/htmlcssguide.xml
1 parent d289deb commit 4fc5990

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

appengine/appidentity/src/main/java/com/example/appengine/appidentity/UrlShortenerServlet.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ public UrlShortenerServlet() {
3838
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
3939
PrintWriter w = resp.getWriter();
4040
w.println("<!DOCTYPE html>");
41-
w.println("<form method='post'>");
42-
w.println("<label for='longUrl'>URL:</label>");
43-
w.println("<input id='longUrl' name='longUrl' type='text'>");
44-
w.println("<input type='submit' value='Shorten'>");
41+
w.println("<meta charset=\"utf-8\">");
42+
w.println("<title>Asserting Identity to Google APIs - App Engine App Identity Example</title>");
43+
w.println("<form method=\"post\">");
44+
w.println("<label for=\"longUrl\">URL:</label>");
45+
w.println("<input id=\"longUrl\" name=\"longUrl\" type=\"text\">");
46+
w.println("<input type=\"submit\" value=\"Shorten\">");
4547
w.println("</form>");
4648
}
4749

0 commit comments

Comments
 (0)