<commit_before><!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>Privly URL Parameter Test File</title>
  <script src="../jquery-1.7.1.min.js" type="text/javascript"></script>
  
  <script type="text/javascript">
    
    // Default host domain for test content is priv.ly
    var hostDomain = "https://priv.ly";
    
    //The anchortext can optionally specify the domain containing the content.
    //It defaults to https://priv.ly, but you could set it to 
    // http://localhost:3000 if you want to.
    if ( location.hash !== "" )
      hostDomain = location.hash.substr(1);
    
    // This JSON document defines all the test cases for this page.
    // The format for ths JSON document is:
    //
    // {
    //   [
    //     {
    //       title:"test title",
    //       notes:"Notes on the traits of the test",
    //       should:"Description of the desired result",
    //       link_body: "The text to place into the link body",
    //       test_paragraph: "The plain text in front of the link",
    //       a:{
    //          href: "/address/..."
    //          any_other_attributes: ""
    //         }
    //     }, ...
    //   ]
    // }
    //
    // Links which should get replaced have "class": "replace_link" defined.
    //
    var testCases =
      [
        {
          title: "No Parameters",
          notes: "These links have no parameters specified",
          should: "Should replace the link with the referenced content",
          link_body: "FAILURE!!!",
          a: {
            href: hostDomain + "/posts/2?privlyApp=PlainPost#privlyInject1",
            "class": "replace_link"
          }
        },
        
        {
          title: "Forced Exclusion by Parameter",
          notes: "This link should not be processed by the extension because a parameter forces its exclusion.",
          should: "Should read 'Success'",
          link_body: "Success",
          a: {
            href: hostDomain + "/posts/2?privlyExclude=true&privlyApp=PlainPost#privlyInject1"
          }
        },
        
        {
          title: "Forced Exclusion by Attribute",
          notes: "An attribute on the link prevents the extension from processing this link.",
          should: "Should read 'Success'",
          link_body: "Success",
          a: {
            href: hostDomain + "/posts/2&privlyApp=PlainPost#privlyInject1",
            "data-privly-exclude": "true"
          }
        },
        
        {
          title: "Content Editable",
          notes: "This link is editable, and should not be replaced.",
          should: "Should not replace link",
          link_body: "Success",
          a: {
            href: hostDomain + "/zero_bin/?privlyApp=ZeroBin#privlyLinkKey=TWjeUspt5JHH%2Fi5oEQ2d5jQBsBd2SrRq0IwZAMBW65A%3D&privlyCiphertextURL=https%3A%2F%2Fpriv.ly%2Fzero_bin%2F507%3FburntAfter%3D136646%26random_token%3D827cdf6c0c&privlyInject1=true&p=p",
            contentEditable: true
          }
        },
        
        {
          title: "Closure Library Editable",
          notes: "Google's Open Source Closure library supports editing content " + 
                 "when the contentEditable attribute is not true. " +
                 "The extension should ignore content that is editable by " + 
                 " the closure library.",
          should: "Should not replace link",
          link_body: "Success",
          a: {
            href: hostDomain + "/zero_bin/?privlyApp=ZeroBin#privlyLinkKey=TWjeUspt5JHH%2Fi5oEQ2d5jQBsBd2SrRq0IwZAMBW65A%3D&privlyCiphertextURL=https%3A%2F%2Fpriv.ly%2Fzero_bin%2F507%3FburntAfter%3D136646%26random_token%3D827cdf6c0c&privlyInject1=true&p=p",
            g_editable: true
          }
        }
      ]
      
    //
    // Onready event initializes the page once it loads/
    //
    jQuery(document).ready(function() {
      
      //For each test case
      $.each(testCases, function(key, value){
        
        //Copy the test case HTML to the test area and assign the values
        var cloned = $('#blank_test_case').clone().css("display","").appendTo('#test_area');
        cloned.children(".test_title").text(key + ". " + value.title);
        cloned.children(".test_should").text(value.should);<commit_msg>for closure library, contentEditable attribute does exist<commit_after><!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>Privly URL Parameter Test File</title>
  <script src="../jquery-1.7.1.min.js" type="text/javascript"></script>
  
  <script type="text/javascript">
    
    // Default host domain for test content is priv.ly
    var hostDomain = "https://priv.ly";
    
    //The anchortext can optionally specify the domain containing the content.
    //It defaults to https://priv.ly, but you could set it to 
    // http://localhost:3000 if you want to.
    if ( location.hash !== "" )
      hostDomain = location.hash.substr(1);
    
    // This JSON document defines all the test cases for this page.
    // The format for ths JSON document is:
    //
    // {
    //   [
    //     {
    //       title:"test title",
    //       notes:"Notes on the traits of the test",
    //       should:"Description of the desired result",
    //       link_body: "The text to place into the link body",
    //       test_paragraph: "The plain text in front of the link",
    //       a:{
    //          href: "/address/..."
    //          any_other_attributes: ""
    //         }
    //     }, ...
    //   ]
    // }
    //
    // Links which should get replaced have "class": "replace_link" defined.
    //
    var testCases =
      [
        {
          title: "No Parameters",
          notes: "These links have no parameters specified",
          should: "Should replace the link with the referenced content",
          link_body: "FAILURE!!!",
          a: {
            href: hostDomain + "/posts/2?privlyApp=PlainPost#privlyInject1",
            "class": "replace_link"
          }
        },
        
        {
          title: "Forced Exclusion by Parameter",
          notes: "This link should not be processed by the extension because a parameter forces its exclusion.",
          should: "Should read 'Success'",
          link_body: "Success",
          a: {
            href: hostDomain + "/posts/2?privlyExclude=true&privlyApp=PlainPost#privlyInject1"
          }
        },
        
        {
          title: "Forced Exclusion by Attribute",
          notes: "An attribute on the link prevents the extension from processing this link.",
          should: "Should read 'Success'",
          link_body: "Success",
          a: {
            href: hostDomain + "/posts/2&privlyApp=PlainPost#privlyInject1",
            "data-privly-exclude": "true"
          }
        },
        
        {
          title: "Content Editable",
          notes: "This link is editable, and should not be replaced.",
          should: "Should not replace link",
          link_body: "Success",
          a: {
            href: hostDomain + "/zero_bin/?privlyApp=ZeroBin#privlyLinkKey=TWjeUspt5JHH%2Fi5oEQ2d5jQBsBd2SrRq0IwZAMBW65A%3D&privlyCiphertextURL=https%3A%2F%2Fpriv.ly%2Fzero_bin%2F507%3FburntAfter%3D136646%26random_token%3D<PASSWORD>&privlyInject1=true&p=p",
            contentEditable: true
          }
        },
        
        {
          title: "Closure Library Editable",
          notes: "Google's Open Source Closure library supports editing content " + 
                 "when the contentEditable attribute is not true. " +
                 "The extension should ignore content that is editable by " + 
                 " the closure library.",
          should: "Should not replace link",
          link_body: "Success",
          a: {
            href: hostDomain + "/zero_bin/?privlyApp=ZeroBin#privlyLinkKey=TWjeUspt5JHH%2Fi5oEQ2d5jQBsBd2SrRq0IwZAMBW65A%3D&privlyCiphertextURL=https%3A%2F%2Fpriv.ly%2Fzero_bin%2F507%3FburntAfter%3D136646%26random_token%3D<PASSWORD>&privlyInject1=true&p=p",
            contentEditable: '',
            g_editable: true
          }
        }
      ]
      
    //
    // Onready event initializes the page once it loads/
    //
    jQuery(document).ready(function() {
      
      //For each test case
      $.each(testCases, function(key, value){
        
        //Copy the test case HTML to the test area and assign the values
        var cloned = $('#blank_test_case').clone().css("display","").appendTo('#test_area');
        cloned.children(".test_title").text(key + ". " + value.title);
        cloned.children(".test_should").text(value.should);
{'fraction_non_alphanumeric': 0.11814689791642416, 'fraction_numerical': 0.01862414154347573, 'mean_word_length': 2.0010478519035977, 'pattern_counts': {'":': 6, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 4, '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': '4987340', 'n_tokens_mistral': 2621, 'n_tokens_neox': 2542, 'n_words': 638}