{"action":"created","issue":{"url":"https://api.github.com/repos/ocsigen/ocsigenserver/issues/97","repository_url":"https://api.github.com/repos/ocsigen/ocsigenserver","labels_url":"https://api.github.com/repos/ocsigen/ocsigenserver/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/ocsigen/ocsigenserver/issues/97/comments","events_url":"https://api.github.com/repos/ocsigen/ocsigenserver/issues/97/events","html_url":"https://github.com/ocsigen/ocsigenserver/issues/97","id":148764302,"number":97,"title":"Regression in Ocsigenserver 2.7: use of forward slash in random string causes browser problems","user":{"login":"darioteixeira","id":2505511,"avatar_url":"https://avatars.githubusercontent.com/u/2505511?v=3","gravatar_id":"","url":"https://api.github.com/users/darioteixeira","html_url":"https://github.com/darioteixeira","followers_url":"https://api.github.com/users/darioteixeira/followers","following_url":"https://api.github.com/users/darioteixeira/following{/other_user}","gists_url":"https://api.github.com/users/darioteixeira/gists{/gist_id}","starred_url":"https://api.github.com/users/darioteixeira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darioteixeira/subscriptions","organizations_url":"https://api.github.com/users/darioteixeira/orgs","repos_url":"https://api.github.com/users/darioteixeira/repos","events_url":"https://api.github.com/users/darioteixeira/events{/privacy}","received_events_url":"https://api.github.com/users/darioteixeira/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-15T20:42:14Z","updated_at":"2016-04-30T17:11:35Z","closed_at":null,"body":"I've come across a really weird problem after the Ocsigenserver 2.7 update: the DOM tree parsed by the browser was not the same as the one generated by Eliom!  Looking at the HTML generated with 2.6 and 2.7, the only difference I can find is that in 2.7 the random string used (for example) by Eliom's non-attached co-services contains sometimes an actual forward slash `/` character.  I reckon this may be tripping the browser's parser... (I tested with Firefox and Chrome under Linux)\r\n\r\nWere there changes in the Base64 encoder between 2.6 and 2.7?"},"comment":{"url":"https://api.github.com/repos/ocsigen/ocsigenserver/issues/comments/215979552","html_url":"https://github.com/ocsigen/ocsigenserver/issues/97#issuecomment-215979552","issue_url":"https://api.github.com/repos/ocsigen/ocsigenserver/issues/97","id":215979552,"user":{"login":"darioteixeira","id":2505511,"avatar_url":"https://avatars.githubusercontent.com/u/2505511?v=3","gravatar_id":"","url":"https://api.github.com/users/darioteixeira","html_url":"https://github.com/darioteixeira","followers_url":"https://api.github.com/users/darioteixeira/followers","following_url":"https://api.github.com/users/darioteixeira/following{/other_user}","gists_url":"https://api.github.com/users/darioteixeira/gists{/gist_id}","starred_url":"https://api.github.com/users/darioteixeira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darioteixeira/subscriptions","organizations_url":"https://api.github.com/users/darioteixeira/orgs","repos_url":"https://api.github.com/users/darioteixeira/repos","events_url":"https://api.github.com/users/darioteixeira/events{/privacy}","received_events_url":"https://api.github.com/users/darioteixeira/received_events","type":"User","site_admin":false},"created_at":"2016-04-30T17:11:35Z","updated_at":"2016-04-30T17:11:35Z","body":"I'm also having trouble reliably replicating the issue outside the main (large) application.  What I do know is the following:\r\n\r\n  * after an `opam pin add ocsigenserver 2.6` and a recompilation, the app works fine.\r\n  * after an `opam pin add ocsigenserver 2.7` and a recompilation, the app shows up garbled.\r\n\r\nLooking at the generated HTML, it's clear why it is garbled with 2.7: the HTML is not even valid.  Here's the first few lines: (pretty-printed and with comments removed)\r\n\r\n````html\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n    <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\r\n    <title>Mixer1</title>\r\n    <meta charset=\"utf-8\">\r\n    <link title=\"Default\" media=\"all\" type=\"text/css\" href=\"Mixer1_files/default.css\" rel=\"stylesheet\">\r\n    <script defer=\"defer\" src=\"Mixer1_files/ceemi.js\" type=\"text/javascript\"></script>\r\n</head>\r\n````\r\nWhereas the output with 2.6 is fine:\r\n\r\n````html\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n    <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />\r\n    <title>Mixer1</title>\r\n    <meta charset=\"utf-8\" />\r\n    <link title=\"Default\" media=\"all\" type=\"text/css\" href=\"Mixer2_files/default.css\" rel=\"stylesheet\" />\r\n    <script defer=\"defer\" src=\"Mixer2_files/ceemi.js\" type=\"text/javascript\"></script>\r\n</head>\r\n</html>\r\n````\r\nI've been playing with smaller examples, but with those the only difference I can find between 2.6 and 2.7 is the change in `content-type` on the HTTP headers...\r\n\r\nNow, I really can't explain why invalid HTML is being generated by this app but only with Ocsigenserver 2.7.  (I'm only using safe Eliom/Tyxml, with no injection of unsafe raw HTML.)"}}