<commit_before>{% extends 'index.html' %}

{% block body %}

{% if error %}
  <div style="color: red">
    <h1>Error</h1>
    <pre>{{ error.message }}</pre>
  </div>
{% else %}

  {% set safe_content = result.user.content|replace("'", "&#8217;")|default('', None)|safe or '""' %}
  {% set safe_cred_response = credentials_response.content|default('', None)|safe or '""' %}

  <h1>User</h1>
  <table>
    {% for property in user_properties %}
      <tr">
        <td><strong>{{ property }}:&nbsp;</strong></td>
        <td id="{{ property }}">{{ result.user[property]|default('', true) }}</td>
      </tr>
    {% endfor %}
    <tr class="hidden">
      <td><strong>content:&nbsp;</strong></td>
      <td id="content">{{ result.user.content }}</td>
    </tr>
  </table>

  {% if original_credentials %}
    <h1>Original Credentials</h1>
    <table>
      {% for k, v in original_credentials.items() %}
      <tr class="{% if k == 'config' %}hidden{% endif %}"}>
        <td><strong>{{ k }}:&nbsp;</strong></td>
        <td id="original-credentials-{{ k }}">{{ v|default('', true) }}</td>
      </tr>
      {% endfor %}
    </table>

    <h2>Credentials Refresh</h2>
    <h4>Refresh Response Status: <span id="original-credentials-refresh_status">{{ credentials_response.status|default('REFRESH NOT SUPPORTED') }}</span></h4>
    <pre id="credentials-response" class="prettyprint"></pre>

    <h1>Refreshed Credentials</h1>
    <table>
      {% for k, v in refreshed_credentials.items() %}
      <tr class="{% if k == 'config' %}hidden{% endif %}"}>
        <td><strong>{{ k }}:&nbsp;</strong></td>
        <td id="refreshed-credentials-{{ k }}">{{ v|default('', true) }}</td>
      </tr>
      {% endfor %}
    </table>
  {% endif %}

  <h2>Human Readable Content</h2>
  <pre id="human-readable-user-content" class="prettyprint"></pre>
  <h2>User content should contain these strings:</h2>
  <pre id="user-content-json-keys" class="prettyprint"></pre>

  <script type="text/javascript">

    // Display syntax-highlighted user-info response content
    var userContent = document.getElementById('human-readable-user-content');
    try {
        userContent.innerHTML = JSON.stringify({{ safe_content }}, undefined, 4);
    } catch(e) {
         userContent.innerHTML = '{{ safe_content|replace('\n', ' ') }}';
    }

    // Display syntax-highlighted strings user-info response should contain
    var pattern = /"([^"]+)":/g;
    var matches
    var output = [];
    while (matches = pattern.exec(userContent.innerHTML)) {
        var res = "'" + matches[1] + "'";
        if(output.indexOf(res) === -1){
            output.push(res);
        }
    }
    var userContentJSONKeys = document.getElementById('user-content-json-keys');
    userContentJSONKeys.innerHTML = "[" + output.join(', ') + "]";

    // Display syntax-highlighted credentials refresh response content
    var credentialsResponse = document.getElementById('credentials-response');
    try {
        credentialsResponse.innerHTML = JSON.stringify({{ safe_cred_response }}, undefined, 4);
    } catch(e) {
        credentialsResponse.innerHTML = '{{ safe_cred_response|replace('\n', ' ') }}';
    }
  </script>
{% endif %}
{% endblock %}<commit_msg>Added replacement for carriage return for imbecile windows life JSON.<commit_after>{% extends 'index.html' %}

{% block body %}

{% if error %}
  <div style="color: red">
    <h1>Error</h1>
    <pre>{{ error.message }}</pre>
  </div>
{% else %}

  {% set safe_content = result.user.content|replace("'", "&#8217;")|default('', None)|safe or '""' %}
  {% set safe_cred_response = credentials_response.content|default('', None)|safe or '""' %}

  <h1>User</h1>
  <table>
    {% for property in user_properties %}
      <tr">
        <td><strong>{{ property }}:&nbsp;</strong></td>
        <td id="{{ property }}">{{ result.user[property]|default('', true) }}</td>
      </tr>
    {% endfor %}
    <tr class="hidden">
      <td><strong>content:&nbsp;</strong></td>
      <td id="content">{{ result.user.content }}</td>
    </tr>
  </table>

  {% if original_credentials %}
    <h1>Original Credentials</h1>
    <table>
      {% for k, v in original_credentials.items() %}
      <tr class="{% if k == 'config' %}hidden{% endif %}"}>
        <td><strong>{{ k }}:&nbsp;</strong></td>
        <td id="original-credentials-{{ k }}">{{ v|default('', true) }}</td>
      </tr>
      {% endfor %}
    </table>

    <h2>Credentials Refresh</h2>
    <h4>Refresh Response Status: <span id="original-credentials-refresh_status">{{ credentials_response.status|default('REFRESH NOT SUPPORTED') }}</span></h4>
    <pre id="credentials-response" class="prettyprint"></pre>

    <h1>Refreshed Credentials</h1>
    <table>
      {% for k, v in refreshed_credentials.items() %}
      <tr class="{% if k == 'config' %}hidden{% endif %}"}>
        <td><strong>{{ k }}:&nbsp;</strong></td>
        <td id="refreshed-credentials-{{ k }}">{{ v|default('', true) }}</td>
      </tr>
      {% endfor %}
    </table>
  {% endif %}

  <h2>Human Readable Content</h2>
  <pre id="human-readable-user-content" class="prettyprint"></pre>
  <h2>User content should contain these strings:</h2>
  <pre id="user-content-json-keys" class="prettyprint"></pre>

  <script type="text/javascript">

    // Display syntax-highlighted user-info response content
    var userContent = document.getElementById('human-readable-user-content');
    try {
        userContent.innerHTML = JSON.stringify({{ safe_content }}, undefined, 4);
    } catch(e) {
         userContent.innerHTML = '{{ safe_content|replace('\n', ' ')|replace('\r', ' ') }}';
    }

    // Display syntax-highlighted strings user-info response should contain
    var pattern = /"([^"]+)":/g;
    var matches
    var output = [];
    while (matches = pattern.exec(userContent.innerHTML)) {
        var res = "'" + matches[1] + "'";
        if(output.indexOf(res) === -1){
            output.push(res);
        }
    }
    var userContentJSONKeys = document.getElementById('user-content-json-keys');
    userContentJSONKeys.innerHTML = "[" + output.join(', ') + "]";

    // Display syntax-highlighted credentials refresh response content
    var credentialsResponse = document.getElementById('credentials-response');
    try {
        credentialsResponse.innerHTML = JSON.stringify({{ safe_cred_response }}, undefined, 4);
    } catch(e) {
        credentialsResponse.innerHTML = '{{ safe_cred_response|replace('\n', ' ')|replace('\r', ' ') }}';
    }
  </script>
{% endif %}
{% endblock %}
{'fraction_non_alphanumeric': 0.20254523152407236, 'fraction_numerical': 0.007359705611775529, 'mean_word_length': 3.2661870503597124, 'pattern_counts': {'":': 2, '<': 139, '<?xml version=': 0, '>': 139, 'https://': 0, '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': '5097512', 'n_tokens_mistral': 2184, 'n_tokens_neox': 2033, 'n_words': 427}