mirror of
https://github.com/penpot/penpot.git
synced 2025-03-27 23:21:47 -05:00
Merge pull request #2744 from penpot/alotor-fix-svg-upload
🐛 Fix problem uploading svg with style tag
This commit is contained in:
commit
94fc067286
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 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 problem with SVG imports with style [#2605](https://github.com/penpot/penpot/issues/2605)
|
||||
|
||||
## 1.16.2-beta
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
(for [item childs]
|
||||
[:& shape-wrapper {:shape item :key (dm/str (:id item))}])]
|
||||
|
||||
(and svg-leaf? valid-tag?)
|
||||
svg-leaf?
|
||||
content
|
||||
|
||||
:else nil))))
|
||||
|
|
|
@ -98,9 +98,17 @@
|
|||
(and (some? active-frames)
|
||||
(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)))
|
||||
[:g.workspace-shape-wrapper
|
||||
[:> wrapper wrapper-props
|
||||
(case (:type shape)
|
||||
:path [:> path/path-wrapper opts]
|
||||
:text [:> text/text-wrapper opts]
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
(defonce matrices-regex #"(matrix|translate|scale|rotate|skewX|skewY)\(([^\)]*)\)")
|
||||
(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
|
||||
(defonce svg-tags-list
|
||||
|
|
Loading…
Add table
Reference in a new issue