Skip to content

Commit

Permalink
Bugfix: Remove space ( ) and comma (,) encoding from inline-svg f…
Browse files Browse the repository at this point in the history
…unction (#825)

* Remove space and comma encoding from inline-svg's url-encode() function

* rebuild assets

* Update changelog

* Update pmc-inline-svg() test
  • Loading branch information
JordanPak committed Nov 6, 2023
1 parent 225578f commit 2d27ced
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 23 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unpublished Changes
* Switch Webpack config "query" JS rule that's throwing warnings and build errors out for "options"
* Updated Backstop reference images to 1.58.0 release.
* Bugfix: Remove ` ` (space) and `,` encoding from `inline-svg`'s `url-encode()` to fix misc base64 SVG inlining.

## 1.58.0 11-01-2023
* Update Node to 18 and fix incompatible dependencies, scripts, and GitHub actions
Expand Down
2 changes: 1 addition & 1 deletion build/css/larva-important.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/css/larva.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/css/larva.inline-important.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/css/larva.inline.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/svg/defs/sprite.defs.html
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ <h2>youtube, </h2>

</section>
<footer>
<p>Generated at Tue, 31 Oct 2023 19:42:55 GMT by <a href="https://github.com/svg-sprite/svg-sprite" target="_blank" rel="noopener noreferrer">svg-sprite</a>.</p>
<p>Generated at Fri, 03 Nov 2023 15:57:09 GMT by <a href="https://github.com/svg-sprite/svg-sprite" target="_blank" rel="noopener noreferrer">svg-sprite</a>.</p>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion packages/larva-css/build/css/algorithms.common.async.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions packages/larva-css/build/css/algorithms.common.inline.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/larva-scss/__tests__/functions.test.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

@include expect {
.a-icon-right-arrow {
--icon: url( "data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2710%27%20height%3D%2716%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20xmlns%3Axlink%3D%27http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%27%3E%3Cdefs%3E%3Cpath%20d%3D%27M25.663%2090.25l-6.75%206.429c-.226.214-.45.321-.788.321-.337%200-.563-.107-.788-.321-.45-.429-.45-1.072%200-1.5L23.3%2089.5l-5.963-5.679c-.45-.428-.45-1.071%200-1.5a1.125%201.125%200%200%201%201.576%200l6.75%206.429c.45.429.45%201.071%200%201.5z%27%20id%3D%27a%27%2F%3E%3C%2Fdefs%3E%3Cuse%20fill%3D%27%23FFF%27%20transform%3D%27matrix%28-1%200%200%201%2026.5%20-81.5%29%27%20xlink%3Ahref%3D%27%23a%27%2F%3E%3C%2Fsvg%3E" );
--icon: url( "data:image/svg+xml;charset=US-ASCII,%3Csvg width%3D%2710%27 height%3D%2716%27 xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27 xmlns%3Axlink%3D%27http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%27%3E%3Cdefs%3E%3Cpath d%3D%27M25.663 90.25l-6.75 6.429c-.226.214-.45.321-.788.321-.337 0-.563-.107-.788-.321-.45-.429-.45-1.072 0-1.5L23.3 89.5l-5.963-5.679c-.45-.428-.45-1.071 0-1.5a1.125 1.125 0 0 1 1.576 0l6.75 6.429c.45.429.45 1.071 0 1.5z%27 id%3D%27a%27%2F%3E%3C%2Fdefs%3E%3Cuse fill%3D%27%23FFF%27 transform%3D%27matrix%28-1 0 0 1 26.5 -81.5%29%27 xlink%3Ahref%3D%27%23a%27%2F%3E%3C%2Fsvg%3E" );
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions packages/larva-scss/lib/tools/functions/_pmc-inline-svg.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
'%': '%25',
'<': '%3C',
'>': '%3E',
' ': '%20',
'!': '%21',
'*': '%2A',
'"': '%27',
Expand All @@ -26,7 +25,6 @@
'=': '%3D',
'+': '%2B',
'$': '%24',
',': '%2C',
'/': '%2F',
'?': '%3F',
'#': '%23',
Expand Down
2 changes: 1 addition & 1 deletion packages/larva/build/css/larva-important.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/larva/build/css/larva.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/larva/build/css/larva.inline-important.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/larva/build/css/larva.inline.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/larva/build/svg/defs/sprite.defs.html
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ <h2>youtube, </h2>

</section>
<footer>
<p>Generated at Tue, 31 Oct 2023 19:42:55 GMT by <a href="https://github.com/svg-sprite/svg-sprite" target="_blank" rel="noopener noreferrer">svg-sprite</a>.</p>
<p>Generated at Fri, 03 Nov 2023 15:57:09 GMT by <a href="https://github.com/svg-sprite/svg-sprite" target="_blank" rel="noopener noreferrer">svg-sprite</a>.</p>
</footer>
</body>
</html>

0 comments on commit 2d27ced

Please sign in to comment.