king
2023-01-13 7adf0212cd71a8ec604f65ba2c2e9bdfc5dec22d
src/components/mk-icon/index.jsx
@@ -471,7 +471,20 @@
        MkIcons[type](resProps)
      )
    } else {
      return <span className={'anticon anticon-mk ' + (resProps.className || '')} style={resProps.style || null} dangerouslySetInnerHTML={{ __html: type }}></span>
      let svg = type
      if (!/<svg/.test(svg)) {
        try {
          svg = window.decodeURIComponent(window.atob(svg))
          if (!/<svg/.test(svg)) {
            svg = ''
          }
        } catch (e) {
          svg = ''
        }
      }
      return <span className={'anticon anticon-mk ' + (resProps.className || '')} style={resProps.style || null} dangerouslySetInnerHTML={{ __html: svg }}></span>
    }
  }
}