{"comment":{"created_at":"2011-10-08T06:07:48Z","body":"We might solve this by waiting to raise an error until the expression is evaluated.","updated_at":"2011-10-08T06:07:48Z","url":"https://api.github.com/repos/malthe/chameleon/issues/comments/2330654","id":2330654,"user":{"avatar_url":"https://secure.gravatar.com/avatar/7e5c476f7ed6fcbb67eee738e304f066?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/malthe","id":26405,"login":"malthe"}},"action":"created","issue":{"number":62,"created_at":"2011-09-20T14:17:48Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"The ZPT reference implementation allows the following markup structure (which is arguably sketchy)\r\n\r\n```\r\n<div tal:content=\"string:foobar\"><span tal:replace=\"${context/id}\"/></div>\r\n```\r\n\r\nThe outer ``tal:content`` replaces the contents of the ``<div>`` tag with the TALES expression and the invalid TALES expression contained within is ignored. However, when using Chameleon the inner TALES expression is also evaluated which leads to a ``chameleon.exc.ExpressionError: Not a valid path-expression``.\r\n\r\nThis issue came up while using z3c.form (http://svn.zope.org/z3c.form/trunk/src/z3c/form/browser/orderedselect_input.pt?rev=90975&view=markup) where they have markup such as\r\n\r\n```\r\n      <span id=\"toDataContainer\"\r\n            tal:attributes=\"id string:${view/id}-toDataContainer\">\r\n        <script type=\"text/javascript\" tal:content=\"string:\r\n          copyDataForSubmit('${view/id}');\">\r\n          // initial copying of field \"field.to\" --> \"field\"\r\n          copyDataForSubmit(\"<i tal:replace=\"${view/id}\"/>\");\r\n        </script>\r\n      </span>\r\n```\r\n\r\nArguably this should be changed in z3c.form but should Chameleon behave consistently with the reference implementation in this regard? It does present an obstacle with using Chameleon now with templates from existing packages.","comments":5,"title":"Difference in behavior between Chameleon and reference implementation","updated_at":"2011-10-08T06:07:48Z","url":"https://api.github.com/repos/malthe/chameleon/issues/62","id":1688165,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/aa5a446e81f3256897b8480ea93ac8c9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/dokai","id":5369,"login":"dokai"},"html_url":"https://github.com/malthe/chameleon/issues/62","labels":[{"name":"core","url":"https://api.github.com/repos/malthe/chameleon/labels/core","color":"02d7e1"}],"state":"open"},"legacy":{"issue_id":1688165,"comment_id":2330654}}