{"action":"created","issue":{"url":"https://api.github.com/repos/lazytiger/gumbo-query/issues/24","labels_url":"https://api.github.com/repos/lazytiger/gumbo-query/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/lazytiger/gumbo-query/issues/24/comments","events_url":"https://api.github.com/repos/lazytiger/gumbo-query/issues/24/events","html_url":"https://github.com/lazytiger/gumbo-query/issues/24","id":124687892,"number":24,"title":"Crash when select string include '(' char.","user":{"login":"metalwood","id":4507840,"avatar_url":"https://avatars.githubusercontent.com/u/4507840?v=3","gravatar_id":"","url":"https://api.github.com/users/metalwood","html_url":"https://github.com/metalwood","followers_url":"https://api.github.com/users/metalwood/followers","following_url":"https://api.github.com/users/metalwood/following{/other_user}","gists_url":"https://api.github.com/users/metalwood/gists{/gist_id}","starred_url":"https://api.github.com/users/metalwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metalwood/subscriptions","organizations_url":"https://api.github.com/users/metalwood/orgs","repos_url":"https://api.github.com/users/metalwood/repos","events_url":"https://api.github.com/users/metalwood/events{/privacy}","received_events_url":"https://api.github.com/users/metalwood/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-04T02:43:40Z","updated_at":"2016-01-04T09:27:43Z","closed_at":null,"body":"I am searching a \"script\" node in facebook html source, the node is like\r\n<.s.c.r.i.p.t.>require(\"TimeSlice\").guard(function() ... ///< The dots in \"script\" is for showing this line normally in issue page.\r\n\r\nSo I use this selector to find this node\r\nCSelection c = doc.find(\"script:contains(require(\\\"TimeSlice\\\"))\");\r\n\r\nBut, the app crashed with error \"terminate called after throwing an instance of 'std::string'\", GDB says it crash in doc.find function.\r\n\r\nIf I use CSelection c = doc.find(\"script:contains(require)\"), it works well. But these nodes are not what I want. So, I think gumbo-query's \"contains\" filter does not support '(' in it."},"comment":{"url":"https://api.github.com/repos/lazytiger/gumbo-query/issues/comments/168620618","html_url":"https://github.com/lazytiger/gumbo-query/issues/24#issuecomment-168620618","issue_url":"https://api.github.com/repos/lazytiger/gumbo-query/issues/24","id":168620618,"user":{"login":"TechnikEmpire","id":11234763,"avatar_url":"https://avatars.githubusercontent.com/u/11234763?v=3","gravatar_id":"","url":"https://api.github.com/users/TechnikEmpire","html_url":"https://github.com/TechnikEmpire","followers_url":"https://api.github.com/users/TechnikEmpire/followers","following_url":"https://api.github.com/users/TechnikEmpire/following{/other_user}","gists_url":"https://api.github.com/users/TechnikEmpire/gists{/gist_id}","starred_url":"https://api.github.com/users/TechnikEmpire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechnikEmpire/subscriptions","organizations_url":"https://api.github.com/users/TechnikEmpire/orgs","repos_url":"https://api.github.com/users/TechnikEmpire/repos","events_url":"https://api.github.com/users/TechnikEmpire/events{/privacy}","received_events_url":"https://api.github.com/users/TechnikEmpire/received_events","type":"User","site_admin":false},"created_at":"2016-01-04T09:27:43Z","updated_at":"2016-01-04T09:27:43Z","body":"No, gumbo-query does not properly parse string sequences like this. Once the parser encounters a \"special\" character like \"(\" or even \"\\\"\", it will discard whatever previous operation it was tasked with doing (such as parsing a string) and change its task based on the newly discovered \"special\" character.\r\n\r\nI'm not criticizing @lazytiger when I criticize stuff like this, just to be clear. He said he blindly ported cascadia over without doing too much testing. The problem is that cascadia has lots of bugs, lots of them. This is one such example, improper string parsing."}}