Bug 1404222 Part 3 - 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 737857 67b84bc21abfe829e25edd3585a01baa0b01a2ab
parent 737856 ab1a2801ac23bddd2723e29c55c03a8b63139131
child 737858 3a05a8192d65f8c9ac6fd3d9312f9bc792d82b91
push id96786
push userbmo:aethanyc@gmail.com
push dateThu, 25 Jan 2018 08:56:50 +0000
bugs1404222, 1430526
milestone60.0a1
Bug 1404222 Part 3 - 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>