<commit_before>var httpRequest;
<% @_vanity_experiments.each do |name, alternative| %>
  var params = "e=<%= name %>&a=<%= alternative.id %>&authenticity_token=" + encodeURIComponent("<%= form_authenticity_token %>");
  if (window.XMLHttpRequest) { // Mozilla, Safari, ...
    httpRequest = new XMLHttpRequest();
  } else if (window.ActiveXObject) { // IE
    try { httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); }
    catch (e) { }
  }
  if (httpRequest) {
    httpRequest.open('POST', "<%= Vanity.playground.add_participant_path %>", true);<commit_msg>Replace js encoding with server-side call.<commit_after>var httpRequest;
<% @_vanity_experiments.each do |name, alternative| %>
  var params = "e=<%= name %>&a=<%= alternative.id %>&authenticity_token=<%= CGI.escape(form_authenticity_token) %>";
  if (window.XMLHttpRequest) { // Mozilla, Safari, ...
    httpRequest = new XMLHttpRequest();
  } else if (window.ActiveXObject) { // IE
    try { httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); }
    catch (e) { }
  }
  if (httpRequest) {
    httpRequest.open('POST', "<%= Vanity.playground.add_participant_path %>", true);
{'fraction_non_alphanumeric': 0.17491166077738515, 'fraction_numerical': 0.0017667844522968198, 'mean_word_length': 4.58128078817734, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '347580', 'n_tokens_mistral': 391, 'n_tokens_neox': 369, 'n_words': 77}