{"action":"created","issue":{"url":"https://api.github.com/repos/nette/latte/issues/91","labels_url":"https://api.github.com/repos/nette/latte/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/nette/latte/issues/91/comments","events_url":"https://api.github.com/repos/nette/latte/issues/91/events","html_url":"https://github.com/nette/latte/issues/91","id":118837687,"number":91,"title":"Arguably wrong escaping of special characters in links outside of href attributes","user":{"login":"josefsabl","id":1252386,"avatar_url":"https://avatars.githubusercontent.com/u/1252386?v=3","gravatar_id":"","url":"https://api.github.com/users/josefsabl","html_url":"https://github.com/josefsabl","followers_url":"https://api.github.com/users/josefsabl/followers","following_url":"https://api.github.com/users/josefsabl/following{/other_user}","gists_url":"https://api.github.com/users/josefsabl/gists{/gist_id}","starred_url":"https://api.github.com/users/josefsabl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josefsabl/subscriptions","organizations_url":"https://api.github.com/users/josefsabl/orgs","repos_url":"https://api.github.com/users/josefsabl/repos","events_url":"https://api.github.com/users/josefsabl/events{/privacy}","received_events_url":"https://api.github.com/users/josefsabl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-25T13:33:59Z","updated_at":"2015-11-25T14:23:02Z","closed_at":"2015-11-25T13:39:33Z","body":"Our problem is as follows. We send typical reset password e-mails using latte. And as anchors are removed in plain-text emails, our markup looks like this\r\n\r\n```html\r\n<a n:href='Sign:resetPassword, email=\"john.doe@gmail.com\"'>reset password</a>\r\n\r\n<p>\r\n\tLink not working?\r\n\t{link Sign:resetPassword, email=\"john.doe@gmail.com\"}\r\n</p>\r\n```\r\n\r\nWhich generates this:\r\n\r\n```html\r\n<a href='https://www.app.cz/reset-password?email=john.doe%40gmail.com'>reset password</a>\r\n\r\n<p>\r\n\tLink not working?\r\n\thttps://www.app.cz/reset-password?email=john.doe%40gmail.com\r\n</p>\r\n```\r\n\r\nLooks good? No!\r\n\r\nAs the second instance of link (under the \"Link not working\" line) is NOT an URL now but plain HTML, the at sign (@) should not be escaped. @ is just @ in HTML.\r\n\r\nIt works in most e-mail clients but not in all apparently as we see many \"user john.doe%40gmail.com does not exist\" errors in our log. Some of clients actually escape % to %25 so the resulting string is %2540 which browser interprets as %40 instead of @.\r\n\r\nIs there some way to fix this? Noescape filter doesn't work (also I still want to escape ampersands correctly). Look like but to me.\r\n\r\nPS: Hash protection has been omitted for clarity ;-)"},"comment":{"url":"https://api.github.com/repos/nette/latte/issues/comments/159620704","html_url":"https://github.com/nette/latte/issues/91#issuecomment-159620704","issue_url":"https://api.github.com/repos/nette/latte/issues/91","id":159620704,"user":{"login":"josefsabl","id":1252386,"avatar_url":"https://avatars.githubusercontent.com/u/1252386?v=3","gravatar_id":"","url":"https://api.github.com/users/josefsabl","html_url":"https://github.com/josefsabl","followers_url":"https://api.github.com/users/josefsabl/followers","following_url":"https://api.github.com/users/josefsabl/following{/other_user}","gists_url":"https://api.github.com/users/josefsabl/gists{/gist_id}","starred_url":"https://api.github.com/users/josefsabl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josefsabl/subscriptions","organizations_url":"https://api.github.com/users/josefsabl/orgs","repos_url":"https://api.github.com/users/josefsabl/repos","events_url":"https://api.github.com/users/josefsabl/events{/privacy}","received_events_url":"https://api.github.com/users/josefsabl/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T14:23:02Z","updated_at":"2015-11-25T14:23:02Z","body":"Not sure but shouldn't noescape filter work in this case anyway?"}}