Comments (4)
Updated from 5.3.0 to 5.3.1 and that solved it. Thanks.
from svgson.
Hi @OfficialCRUGG, thanks for open the Issue.
You have to make use of transformNode
option of stringify, which allow you to transform each node. In this case, you want to decode
html entities. I presume you are in a nodejs env (and not browser), so you have to do it with something like this lib.
Here is an example of transformNode
function:
function transformNode(node) {
return {
...node,
...(node.children ? { children: node.children.map(transformNode) } : {}),
value: entities.decodeHTML(node.value),
};
}
and here is a working example.
from svgson.
There doesn't seem to be any tramsformNode
option in the type definitions, @elrumordelaluz?
from svgson.
what svgson
version are you using? Thanks to your issue I found that this prop wasn't included in types. can you please update in case?
from svgson.
Related Issues (20)
- How to convert JSON to SVG? HOT 2
- Document new stringify features
- JSON schema? HOT 10
- _svgson.default.parse is not a function HOT 2
- --title in master branch HOT 2
- html entity amp; being inserted into urls? HOT 4
- svgson is not a function HOT 1
- Consider using ^ or ~ versions in package.json HOT 2
- Set required version of `svgo` as at least 1.3.2 HOT 2
- stringify:: Having & symbol rendered in text? HOT 2
- main source file HOT 1
- import files from src folder HOT 3
- Keep default values HOT 3
- Querying with selectors? HOT 3
- Why is svgson an async function? HOT 2
- Bump svgo to latest version? HOT 4
- Is repo still active? HOT 5
- Remove omit-deep dep? HOT 1
- version 5.2.1 on npm? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svgson.