)]}'
{"horizon/static/framework/util/tech-debt/helper-functions.spec.js":[{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"dbe980eee421b81453bcd28c3cf115f9fc437bda","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    describe(\u0027escapeRegex\u0027, function () {"},{"line_number":80,"context_line":"      var string1 \u003d \u0027some normal text\u0027;"},{"line_number":81,"context_line":"      var string2 \u003d \u0027\\\u0027$24.00 ^ ?\"\u0027;"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"      it(\u0027should escape regular expression characters\u0027, function () {"},{"line_number":84,"context_line":"        expect(hzUtils.escapeRegex(string1)).toBe(string1);"}],"source_content_type":"text/javascript","patch_set":5,"id":"fa1b9901_16e0b4f9","line":81,"updated":"2015-08-24 13:24:22.000000000","message":"Would it make sense here to enlist every symbol that is replaced? It may be the case with the current spec that if something breaks in regexp escaping, it won\u0027t catch it.","commit_id":"f8b19852a52b394f31203801f1aff072c776b65d"}],"horizon/static/horizon/js/horizon.instances.js":[{"author":{"_account_id":17002,"name":"Coleman Beasley","email":"cbeasley@thoughtworks.com","username":"cbeasley"},"change_message_id":"b468c146632625ab1129ac533c91a4f7547aaef8","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    $(this.get_network_element(\"\")).each(function () {"},{"line_number":54,"context_line":"      var $this \u003d $(this);"},{"line_number":55,"context_line":"      var $input \u003d $this.children(\"input\");"},{"line_number":56,"context_line":"      var name \u003d horizon.string.escapeHtml($this.text().replace(/^\\s+/, \"\"));"},{"line_number":57,"context_line":"      var network_property \u003d {"},{"line_number":58,"context_line":"        \"name\": name,"},{"line_number":59,"context_line":"        \"id\": $input.attr(\"id\"),"}],"source_content_type":"text/javascript","patch_set":10,"id":"7a2fa921_2374b4cd","line":56,"updated":"2015-10-12 22:38:07.000000000","message":"couldn\u0027t the text replace be accomplished with just a text.trim()? Is there a reason we remove spaces only before the name?","commit_id":"44c20462da815d4a33837a1aad2259a0505bb15b"},{"author":{"_account_id":9647,"name":"Justin Pomeroy","email":"jpomero@linux.vnet.ibm.com","username":"jpomero"},"change_message_id":"bf7ec228ead64fa139f05d4df39dd31d4e1ea6d0","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    $(this.get_network_element(\"\")).each(function () {"},{"line_number":54,"context_line":"      var $this \u003d $(this);"},{"line_number":55,"context_line":"      var $input \u003d $this.children(\"input\");"},{"line_number":56,"context_line":"      var name \u003d horizon.string.escapeHtml($this.text().replace(/^\\s+/, \"\"));"},{"line_number":57,"context_line":"      var network_property \u003d {"},{"line_number":58,"context_line":"        \"name\": name,"},{"line_number":59,"context_line":"        \"id\": $input.attr(\"id\"),"}],"source_content_type":"text/javascript","patch_set":10,"id":"5a2ca52d_1bec88c6","line":56,"in_reply_to":"7a2fa921_2374b4cd","updated":"2015-10-13 18:20:48.000000000","message":"Seems reasonable but I don\u0027t know the history of this and it\u0027s not really part of the issue I\u0027m trying to fix here so I\u0027d rather not.","commit_id":"44c20462da815d4a33837a1aad2259a0505bb15b"}],"horizon/static/horizon/js/horizon.js":[{"author":{"_account_id":6825,"name":"Gary W. Smith","email":"garysmith123@gmail.com","username":"gary-w-smith"},"change_message_id":"9db96e3c76f80074d0f015a43b71c05c462c9c08","unresolved":false,"context_lines":[{"line_number":38,"context_line":"      .replace(/\\//g, \u0027\u0026#x2F;\u0027);"},{"line_number":39,"context_line":"  };"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"  /* Utility function for escaping RegEx characters from string. */"},{"line_number":42,"context_line":"  horizon.escape_regex \u003d function(text) {"},{"line_number":43,"context_line":"    return text.replace(/([.*+?^${}()|\\[\\]\\/\\\\])/g, \"\\\\$1\");"},{"line_number":44,"context_line":"  };"}],"source_content_type":"text/javascript","patch_set":3,"id":"7a8c0949_d44ab454","line":41,"updated":"2014-10-29 23:34:03.000000000","message":"It does not smell right to me to put utility functions in the top-level horizon javascript object.  This, and the escape_html function, should be moved into a commun utility object, such as the existing horizon.utils.js.","commit_id":"fa556c4a8e644cad07836a88313e990362f73ceb"},{"author":{"_account_id":8040,"name":"Timur Sufiev","email":"tsufiev@gmail.com","username":"tsufiev"},"change_message_id":"065d5b80181badf10f262c4976ca448c88a89209","unresolved":false,"context_lines":[{"line_number":38,"context_line":"      .replace(/\\//g, \u0027\u0026#x2F;\u0027);"},{"line_number":39,"context_line":"  };"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"  /* Utility function for escaping RegEx characters from string. */"},{"line_number":42,"context_line":"  horizon.escape_regex \u003d function(text) {"},{"line_number":43,"context_line":"    return text.replace(/([.*+?^${}()|\\[\\]\\/\\\\])/g, \"\\\\$1\");"},{"line_number":44,"context_line":"  };"}],"source_content_type":"text/javascript","patch_set":3,"id":"9a80dd14_94f0f792","line":41,"in_reply_to":"7a8c0949_d44ab454","updated":"2015-03-17 16:52:04.000000000","message":"Given the current Horizon js structure, I tend to agree with Gary, horizon/js/angular/services/horizon.utils.js is a more proper place for these routines.","commit_id":"fa556c4a8e644cad07836a88313e990362f73ceb"},{"author":{"_account_id":8512,"name":"Matt Farina","email":"matt@mattfarina.com","username":"mattfarina"},"change_message_id":"fa7647a98377dfccfc8713d3cf2db07b11d827f8","unresolved":false,"context_lines":[{"line_number":38,"context_line":"      .replace(/\\//g, \u0027\u0026#x2F;\u0027);"},{"line_number":39,"context_line":"  };"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"  /* Utility function for escaping RegEx characters from string. */"},{"line_number":42,"context_line":"  horizon.escape_regex \u003d function(text) {"},{"line_number":43,"context_line":"    return text.replace(/([.*+?^${}()|\\[\\]\\/\\\\])/g, \"\\\\$1\");"},{"line_number":44,"context_line":"  };"}],"source_content_type":"text/javascript","patch_set":3,"id":"9a80dd14_9ee62043","line":41,"in_reply_to":"9a80dd14_94f0f792","updated":"2015-03-18 15:21:09.000000000","message":"@Gary and @Timur If I understand it right, you\u0027re suggesting moving this to an angular service and then having a portion of the JS not written in Angular using it.\n\nSince this is needed by code in the non-Angular portion of the codebase this seems like the appropriate place to put it. Or, is there something I\u0027m not seeing?","commit_id":"fa556c4a8e644cad07836a88313e990362f73ceb"},{"author":{"_account_id":6825,"name":"Gary W. Smith","email":"garysmith123@gmail.com","username":"gary-w-smith"},"change_message_id":"c565be86fc3f12901fa6aafcc9ea30578d45c049","unresolved":false,"context_lines":[{"line_number":38,"context_line":"      .replace(/\\//g, \u0027\u0026#x2F;\u0027);"},{"line_number":39,"context_line":"  };"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"  /* Utility function for escaping RegEx characters from string. */"},{"line_number":42,"context_line":"  horizon.escape_regex \u003d function(text) {"},{"line_number":43,"context_line":"    return text.replace(/([.*+?^${}()|\\[\\]\\/\\\\])/g, \"\\\\$1\");"},{"line_number":44,"context_line":"  };"}],"source_content_type":"text/javascript","patch_set":3,"id":"9a80dd14_1e0cf093","line":41,"in_reply_to":"9a80dd14_9ee62043","updated":"2015-03-18 15:31:05.000000000","message":"The point was that the top-level horizon object should not become a dumping ground for utility functions -- this new function and the others already there should be moved into a separate file/module of utility functions.  This is sort of like putting a bunch of utility functions in a project\u0027s uppermost __init__.py.","commit_id":"fa556c4a8e644cad07836a88313e990362f73ceb"}]}
