{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Blazor/issues/1317","repository_url":"https://api.github.com/repos/aspnet/Blazor","labels_url":"https://api.github.com/repos/aspnet/Blazor/issues/1317/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Blazor/issues/1317/comments","events_url":"https://api.github.com/repos/aspnet/Blazor/issues/1317/events","html_url":"https://github.com/aspnet/Blazor/issues/1317","id":350968239,"node_id":"MDU6SXNzdWUzNTA5NjgyMzk=","number":1317,"title":"SVG element attributes get mangled after build","user":{"login":"ransagy","id":6785058,"node_id":"MDQ6VXNlcjY3ODUwNTg=","avatar_url":"https://avatars3.githubusercontent.com/u/6785058?v=4","gravatar_id":"","url":"https://api.github.com/users/ransagy","html_url":"https://github.com/ransagy","followers_url":"https://api.github.com/users/ransagy/followers","following_url":"https://api.github.com/users/ransagy/following{/other_user}","gists_url":"https://api.github.com/users/ransagy/gists{/gist_id}","starred_url":"https://api.github.com/users/ransagy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ransagy/subscriptions","organizations_url":"https://api.github.com/users/ransagy/orgs","repos_url":"https://api.github.com/users/ransagy/repos","events_url":"https://api.github.com/users/ransagy/events{/privacy}","received_events_url":"https://api.github.com/users/ransagy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-15T21:09:32Z","updated_at":"2018-09-28T15:33:49Z","closed_at":null,"author_association":"NONE","body":"In one of my components, I have a simple inline SVG with a path in it:\r\n\r\n```html\r\n<svg class=\"notif-icon\" viewBox=\"0 0 24 24\" preserveAspectRatio=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n            <path d=\"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z\" />\r\n</svg>\r\n```\r\n\r\nNotice the casing on `viewBox` and `preserveAspectRatio`.\r\nAfter building and running the page containing said component, The result looks like this:\r\n\r\n```html\r\n<svg class=\"notif-icon\" viewbox=\"0 0 24 24\" preserveaspectratio=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n            <path d=\"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z\"></path>\r\n</svg>\r\n```\r\n\r\nThe CSS on that element, if that matters:\r\n```css\r\n.notif-icon {\r\n    fill: white;\r\n    width: 36px;\r\n    margin-left: 10px;\r\n    cursor: pointer;\r\n}\r\n```\r\n\r\nThe casing on the attributes got flattened to lower-case in the process. At least in Firefox 61 and Chrome 68, This produces an invalid result. Applying any edit to the element in respective browser's devtools or simply correcting the casing produces the expected result."},"comment":{"url":"https://api.github.com/repos/aspnet/Blazor/issues/comments/425474903","html_url":"https://github.com/aspnet/Blazor/issues/1317#issuecomment-425474903","issue_url":"https://api.github.com/repos/aspnet/Blazor/issues/1317","id":425474903,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTQ3NDkwMw==","user":{"login":"SQL-MisterMagoo","id":11338430,"node_id":"MDQ6VXNlcjExMzM4NDMw","avatar_url":"https://avatars1.githubusercontent.com/u/11338430?v=4","gravatar_id":"","url":"https://api.github.com/users/SQL-MisterMagoo","html_url":"https://github.com/SQL-MisterMagoo","followers_url":"https://api.github.com/users/SQL-MisterMagoo/followers","following_url":"https://api.github.com/users/SQL-MisterMagoo/following{/other_user}","gists_url":"https://api.github.com/users/SQL-MisterMagoo/gists{/gist_id}","starred_url":"https://api.github.com/users/SQL-MisterMagoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SQL-MisterMagoo/subscriptions","organizations_url":"https://api.github.com/users/SQL-MisterMagoo/orgs","repos_url":"https://api.github.com/users/SQL-MisterMagoo/repos","events_url":"https://api.github.com/users/SQL-MisterMagoo/events{/privacy}","received_events_url":"https://api.github.com/users/SQL-MisterMagoo/received_events","type":"User","site_admin":false},"created_at":"2018-09-28T15:33:49Z","updated_at":"2018-09-28T15:33:49Z","author_association":"NONE","body":"I found this problem only occurred if I was binding properties in the SVG to variables in my code.\r\nIf I just have plain svg on the page, it does not mangle the attributes.\r\n"}}
{"actor":{"display_login":"SQL-MisterMagoo"}}