mirror of
https://github.com/penpot/penpot.git
synced 2025-06-14 05:51:40 +02:00
🐛 Fix problem uploading svg with style tag
This commit is contained in:
parent
2c1fb1424c
commit
c42ef7c5b0
4 changed files with 13 additions and 4 deletions
|
@ -38,6 +38,7 @@
|
||||||
- Fix confirm group name with enter doesn't work in assets modal [Taiga #4506](https://tree.taiga.io/project/penpot/issue/4506)
|
- Fix confirm group name with enter doesn't work in assets modal [Taiga #4506](https://tree.taiga.io/project/penpot/issue/4506)
|
||||||
- Fix group/ungroup shapes inside a component [Taiga #4052](https://tree.taiga.io/project/penpot/issue/4052)
|
- Fix group/ungroup shapes inside a component [Taiga #4052](https://tree.taiga.io/project/penpot/issue/4052)
|
||||||
- Fix wrong update of text in components [Taiga #4646](https://tree.taiga.io/project/penpot/issue/4646)
|
- Fix wrong update of text in components [Taiga #4646](https://tree.taiga.io/project/penpot/issue/4646)
|
||||||
|
- Fix problem with SVG imports with style [#2605](https://github.com/penpot/penpot/issues/2605)
|
||||||
|
|
||||||
## 1.16.2-beta
|
## 1.16.2-beta
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@
|
||||||
(for [item childs]
|
(for [item childs]
|
||||||
[:& shape-wrapper {:shape item :key (dm/str (:id item))}])]
|
[:& shape-wrapper {:shape item :key (dm/str (:id item))}])]
|
||||||
|
|
||||||
(and svg-leaf? valid-tag?)
|
svg-leaf?
|
||||||
content
|
content
|
||||||
|
|
||||||
:else nil))))
|
:else nil))))
|
||||||
|
|
|
@ -98,9 +98,17 @@
|
||||||
(and (some? active-frames)
|
(and (some? active-frames)
|
||||||
(not (contains? active-frames (:id shape))))
|
(not (contains? active-frames (:id shape))))
|
||||||
|
|
||||||
opts #js {:shape shape :thumbnail? thumbnail?}]
|
opts #js {:shape shape :thumbnail? thumbnail?}
|
||||||
|
|
||||||
|
svg-leaf? (and (= :svg-raw (:type shape)) (string? (:content shape)))
|
||||||
|
|
||||||
|
[wrapper wrapper-props]
|
||||||
|
(if svg-leaf?
|
||||||
|
[mf/Fragment nil]
|
||||||
|
["g" #js {:className "workspace-shape-wrapper"}])]
|
||||||
|
|
||||||
(when (and (some? shape) (not (:hidden shape)))
|
(when (and (some? shape) (not (:hidden shape)))
|
||||||
[:g.workspace-shape-wrapper
|
[:> wrapper wrapper-props
|
||||||
(case (:type shape)
|
(case (:type shape)
|
||||||
:path [:> path/path-wrapper opts]
|
:path [:> path/path-wrapper opts]
|
||||||
:text [:> text/text-wrapper opts]
|
:text [:> text/text-wrapper opts]
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
(defonce matrices-regex #"(matrix|translate|scale|rotate|skewX|skewY)\(([^\)]*)\)")
|
(defonce matrices-regex #"(matrix|translate|scale|rotate|skewX|skewY)\(([^\)]*)\)")
|
||||||
(defonce number-regex #"[+-]?\d*(\.\d+)?(e[+-]?\d+)?")
|
(defonce number-regex #"[+-]?\d*(\.\d+)?(e[+-]?\d+)?")
|
||||||
|
|
||||||
(defonce tags-to-remove #{:defs :linearGradient :radialGradient :metadata :mask :clipPath :filter :title})
|
(defonce tags-to-remove #{:linearGradient :radialGradient :metadata :mask :clipPath :filter :title})
|
||||||
|
|
||||||
;; https://www.w3.org/TR/SVG11/eltindex.html
|
;; https://www.w3.org/TR/SVG11/eltindex.html
|
||||||
(defonce svg-tags-list
|
(defonce svg-tags-list
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue