<commit_before><%@ page session="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
	<title>Comments</title>
	<link href="css/comments.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h1>Comments</h1>
<form action="comments.htm" method="POST">
	<fieldset>
		<legend>Add comment</legend>
		<label class="label" for="name">Name:</label><input name="name" id="name" class="required"/><br/>
		<label class="label" for="contents">Comment:</label><textarea name="contents" id="contents" rows="4" cols="60" class="required"></textarea><br/>
		<input type="submit" value="Add comment"/>
	</fieldset>
	<c:forEach var="comment" items="${comments}">
		<h2>${comment.name} on ${comment.date}</h2>
		${comment.contents}
		<hr/>
	</c:forEach>
</form>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script>
<script src="js/comments.js"></script><commit_msg>Escaping HTML<commit_after><%@ page session="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
	<title>Comments</title>
	<link href="css/comments.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h1>Comments</h1>
<form action="comments.htm" method="POST">
	<fieldset>
		<legend>Add comment</legend>
		<label class="label" for="name">Name:</label><input name="name" id="name" class="required"/><br/>
		<label class="label" for="contents">Comment:</label><textarea name="contents" id="contents" rows="4" cols="60" class="required"></textarea><br/>
		<input type="submit" value="Add comment"/>
	</fieldset>
	<c:forEach var="comment" items="${comments}">
		<h2><c:out value="${comment.name}" escapeXml="true"/></h2>
		<h3>at ${comment.date}</h3>
		<c:out value="${comment.contents}" escapeXml="true"/>
		<hr/>
	</c:forEach>
</form>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script>
<script src="js/comments.js"></script>
{'fraction_non_alphanumeric': 0.24492685228881547, 'fraction_numerical': 0.012269938650306749, 'mean_word_length': 6.186440677966102, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 83, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2216097', 'n_tokens_mistral': 801, 'n_tokens_neox': 760, 'n_words': 118}