{"issue":{"state":"open","created_at":"2011-11-29T20:58:44Z","updated_at":"2011-11-29T20:59:00Z","user":{"gravatar_id":"7fbb6197a3a1485e3eba0f05b014c483","id":1218405,"url":"https://api.github.com/users/Babelfisch","avatar_url":"https://secure.gravatar.com/avatar/7fbb6197a3a1485e3eba0f05b014c483?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"Babelfisch"},"comments":15,"body":"Erstelle ich ein Modul \"Eigener HTML-Code\" und schreibe folgenden HTML-Code mit einem Kommentar:\n\n```\n<!--p>Test</p-->\n<p>Test</p>\n```\n\n… dann steht nach dem Speichern nur noch folgender Code drin:\n\n```\n<!--p>Test\n```\n\n[Download the attachments](http://www.contao.org/tl_files/tickets/3145.zip \"Download the attachments of this ticket\")\n\n--- _Originally created on June 7th, 2011, at 08:19pm (ID 3145)_","assignee":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"leofeyer"},"number":3145,"id":2392916,"labels":[{"name":"Accepted","color":"6cc644","url":"https://api.github.com/repos/contao/import/labels/Accepted"},{"name":"backend","color":"e6e6e6","url":"https://api.github.com/repos/contao/import/labels/backend"},{"name":"Feature","color":"4183c4","url":"https://api.github.com/repos/contao/import/labels/Feature"}],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Kommentar in Modul Eigener HTML-Code","closed_at":null,"html_url":"https://github.com/contao/import/issues/3145","url":"https://api.github.com/repos/contao/import/issues/3145","milestone":{"state":"open","created_at":"2011-11-29T15:29:59Z","closed_issues":17,"due_on":null,"creator":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"leofeyer"},"number":37,"title":"2.11.0","description":"Contao 2.11.0 (minor release)","url":"https://api.github.com/repos/contao/import/milestones/37","open_issues":14}},"action":"created","comment":{"created_at":"2011-11-29T20:58:57Z","updated_at":"2011-11-29T20:58:57Z","user":{"gravatar_id":"7fbb6197a3a1485e3eba0f05b014c483","id":1218405,"url":"https://api.github.com/users/Babelfisch","avatar_url":"https://secure.gravatar.com/avatar/7fbb6197a3a1485e3eba0f05b014c483?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"Babelfisch"},"body":"Ok, danke für die Erklärung. So riesig groß ist der Aufwand aber nicht, die Kommentare komplett zu erhalten. Dazu müsste man in `Input::stripTags()` nur den Abschnitt:\n\n```\n$varValue = str_replace(array('<!--','<\n\n![]([', '-->'), array('&lt;)--', '&lt;\n\n![]([', '--&gt;'), $varValue);\n$varValue = strip_tags($varValue, $strAllowedTags);\n$varValue = str_replace(array('&lt;)--', '&lt;\n\n![]([', '--&gt;'), array('<)--', '<\n\n![]([', '-->'), $varValue);\n```\n\n… hiermit ersetzen:\n\n```\nif (preg_match_all('/(<).*-->)/', $varValue, $matches, PREG_PATTERN_ORDER))\n{\n\tfor ($i=0; $i<count($matches[1]); $i++)\n\t{\n\t\t$varValue = str_replace($matches[1][$i], '[[[COMMENT'.$i.']]]', $varValue);\n\t}\n\t\n\t$varValue = strip_tags($varValue, $strAllowedTags);\n\t\n\tfor ($i=0; $i<count($matches[1]); $i++)\n\t{\n\t\t$varValue = str_replace('[[[COMMENT'.$i.']]]', $matches[1][$i], $varValue);\n\t}\n}\nelse\n{\n\t$varValue = strip_tags($varValue, $strAllowedTags);\n}\n```\n\nFunktioniert tadellos.\n\n--- _Originally created on August 23rd, 2011, at 07:39pm_","id":2947973,"url":"https://api.github.com/repos/contao/import/issues/comments/2947973"}}