Skip to content

Commit b854551

Browse files
committed
add xss warning in readme
1 parent 5c63141 commit b854551

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ $ npm install blobs
2121
const svg = blobs(options);
2222
```
2323

24+
![](https://svgsaur.us?t=&w=5&h=32&b=fdcc56)![](https://svgsaur.us/?t=WARNING&w=103&h=32&s=16&y=21&x=12&b=feefcd&f=arial&o=b) ![](https://svgsaur.us?t=&w=1&h=48&)
25+
26+
_Options are **not** [sanitized](https://en.wikipedia.org/wiki/HTML_sanitization). Never trust raw user-submitted values in the options._
27+
2428
## Options
2529

2630
#### Required
@@ -47,6 +51,23 @@ _Either `stroke` or `color` must be defined._
4751

4852
_Guides will use stroke color and width if defined. Otherwise, they default to `black` stroke with width of `1`._
4953

54+
##### Example Options Object
55+
56+
```typescript
57+
const options = {
58+
size: 600,
59+
complexity: 0.2,
60+
contrast: 0.4,
61+
color: "#ec576b",
62+
stroke: {
63+
width: 0,
64+
color: "black",
65+
},
66+
guides: false,
67+
seed: "1234",
68+
};
69+
```
70+
5071
## License
5172

5273
[MIT](./LICENSE)

0 commit comments

Comments
 (0)