Bug 1404222 Part 7: Replace hash '#' with %23 in SVG data URIs, to fix XML parse errors. draft
authorTing-Yu Lin <aethanyc@gmail.com>
Thu, 25 Jan 2018 14:58:07 +0800
changeset 762264 57652b4a58adf31ac50e43aee1d6acd3c9fac25b
parent 762263 878db8e338f75ebcb8cd0bef98aaccfe0287be13
child 762265 2275db9fafb482ee4d7872d2e1223e95a753f436
push id101114
push userbwerth@mozilla.com
push dateThu, 01 Mar 2018 23:33:31 +0000
bugs1404222, 1430526
milestone60.0a1
Bug 1404222 Part 7: Replace hash '#' with %23 in SVG data URIs, to fix XML parse errors. The hash symbol '#' is reserved as fragment identifier per bug 1430526 comment 1, so fix the test cases. MozReview-Commit-ID: 5o0qLg81iVi
testing/web-platform/tests/css/css-shapes/shape-outside/shape-image/shape-image-002.html
testing/web-platform/tests/css/css-shapes/shape-outside/shape-image/shape-image-005.html
--- a/testing/web-platform/tests/css/css-shapes/shape-outside/shape-image/shape-image-002.html
+++ b/testing/web-platform/tests/css/css-shapes/shape-outside/shape-image/shape-image-002.html
@@ -17,23 +17,23 @@
         }
         #test {
             width: 100px;
             color: rgb(0, 100, 0);
             background-color: red;
         }
         #image {
             float: left;
-            shape-outside: url('data:image/svg+xml;utf8,<svg width="100px" height="100px" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#006400" d=" M 0.00 0.00 L 50.00 0.00 C 50.00 33.33 50.00 66.67 50.00 100.00 L 0.00 100.00 L 0.00 0.00 Z" /></svg>');
+            shape-outside: url('data:image/svg+xml;utf8,<svg width="100px" height="100px" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="%23006400" d=" M 0.00 0.00 L 50.00 0.00 C 50.00 33.33 50.00 66.67 50.00 100.00 L 0.00 100.00 L 0.00 0.00 Z" /></svg>');
         }
     </style>
 </head>
 <body>
     <p>
         The test passes if you see a solid green square. There should be no red.
     </p>
     <div id="test" class="container">
-        <img id="image" src='data:image/svg+xml;utf8,<svg width="100px" height="100px" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#006400" d=" M 0.00 0.00 L 50.00 0.00 C 50.00 33.33 50.00 66.67 50.00 100.00 L 0.00 100.00 L 0.00 0.00 Z" /></svg>'/>
+        <img id="image" src='data:image/svg+xml;utf8,<svg width="100px" height="100px" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="%23006400" d=" M 0.00 0.00 L 50.00 0.00 C 50.00 33.33 50.00 66.67 50.00 100.00 L 0.00 100.00 L 0.00 0.00 Z" /></svg>'/>
         X
         X
     </div>
 </body>
 </html>
--- a/testing/web-platform/tests/css/css-shapes/shape-outside/shape-image/shape-image-005.html
+++ b/testing/web-platform/tests/css/css-shapes/shape-outside/shape-image/shape-image-005.html
@@ -17,24 +17,24 @@
         }
         #test {
             width: 100px;
             color: rgb(0, 100, 0);
             background-color: red;
         }
         #image {
             float: left;
-            shape-outside: url('data:image/svg+xml;utf8,<svg width="100px" height="100px" style="background-color: rgba(0,0,0,0.7)" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#006400" d=" M 0.00 0.00 L 50.00 0.00 C 50.00 33.33 50.00 66.67 50.00 100.00 L 0.00 100.00 L 0.00 0.00 Z" /></svg>');
+            shape-outside: url('data:image/svg+xml;utf8,<svg width="100px" height="100px" style="background-color: rgba(0,0,0,0.7)" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="%23006400" d=" M 0.00 0.00 L 50.00 0.00 C 50.00 33.33 50.00 66.67 50.00 100.00 L 0.00 100.00 L 0.00 0.00 Z" /></svg>');
             shape-image-threshold: 0.8;
         }
     </style>
 </head>
 <body>
     <p>
         The test passes if you see a solid green square. There should be no red.
     </p>
     <div id="test" class="container">
-        <img id="image" src='data:image/svg+xml;utf8,<svg width="100px" height="100px" style="background-color: rgba(0,0,0,0.7)" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#006400" d=" M 0.00 0.00 L 50.00 0.00 C 50.00 33.33 50.00 66.67 50.00 100.00 L 0.00 100.00 L 0.00 0.00 Z" /></svg>'/>
+        <img id="image" src='data:image/svg+xml;utf8,<svg width="100px" height="100px" style="background-color: rgba(0,0,0,0.7)" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="%23006400" d=" M 0.00 0.00 L 50.00 0.00 C 50.00 33.33 50.00 66.67 50.00 100.00 L 0.00 100.00 L 0.00 0.00 Z" /></svg>'/>
         X
         X
     </div>
 </body>
 </html>