     "meta" "param" "source" "track" "wbr"})
 
 
-(def attr-mapping
-  { :class-name      "class"
-    :className       "class"
-    :html-for        "for"
-    :htmlFor         "for"
-    :default-value   "value"
-    :defaultValue    "value"
+
+(def normalized-attrs
+  ;; https://github.com/facebook/react/blob/master/src/renderers/dom/shared/HTMLDOMPropertyConfig.js
+  { :accept-charset "accept-charset"
+    :access-key "accesskey"
+    :allow-full-screen "allowfullscreen"
+    :allow-transparency "allowtransparency"
+    :auto-complete "autocomplete"
+    :auto-play "autoplay"
+    :cell-padding "cellpadding"
+    :cell-spacing "cellspacing"
+    :char-set "charset"
+    :class-id "classid"
+    :class-name "class"
+    :col-span "colspan"
+    :content-editable "contenteditable"
+    :context-menu "contextmenu"
+    :cross-origin "crossorigin"
+    :date-time "datetime"
     :default-checked "checked"
-    :defaultChecked  "checked" })
+    :default-value "value"
+    :enc-type "enctype"
+    :form-action "formaction"
+    :form-enc-type "formenctype"
+    :form-method "formmethod"
+    :form-no-validate "formnovalidate"
+    :form-target "formtarget"
+    :frame-border "frameborder"
+    :href-lang "hreflang"
+    :html-for "for"
+    :http-equiv "http-equiv"
+    :input-mode "inputmode"
+    :key-params "keyparams"
+    :key-type "keytype"
+    :margin-height "marginheight"
+    :margin-width "marginwidth"
+    :max-length "maxlength"
+    :media-group "mediagroup"
+    :min-length "minlength"
+    :no-validate "novalidate"
+    :radio-group "radiogroup"
+    :read-only "readonly"
+    :row-span "rowspan"
+    :spell-check "spellcheck"
+    :src-doc "srcdoc"
+    :src-lang "srclang"
+    :src-set "srcset"
+    :tab-index "tabindex"
+    :use-map "usemap"
+    :auto-capitalize "autocapitalize"
+    :auto-correct "autocorrect"
+    :auto-save "autosave"
+    :item-prop "itemprop"
+    :item-scope "itemscope"
+    :item-type "itemtype"
+    :item-id "itemid"
+    :item-ref "itemref"
+    
+    ;; https://github.com/facebook/react/blob/master/src/renderers/dom/shared/SVGDOMPropertyConfig.js
+    :allow-reorder "allowReorder"
+    :attribute-name "attributeName"
+    :attribute-type "attributeType"
+    :auto-reverse "autoReverse"
+    :base-frequency "baseFrequency"
+    :base-profile "baseProfile"
+    :calc-mode "calcMode"
+    :clip-path-units "clipPathUnits"
+    :content-script-type "contentScriptType"
+    :content-style-type "contentStyleType"
+    :diffuse-constant "diffuseConstant"
+    :edge-mode "edgeMode"
+    :external-resources-required "externalResourcesRequired"
+    :filter-res "filterRes"
+    :filter-units "filterUnits"
+    :glyph-ref "glyphRef"
+    :gradient-transform "gradientTransform"
+    :gradient-units "gradientUnits"
+    :kernel-matrix "kernelMatrix"
+    :kernel-unit-length "kernelUnitLength"
+    :key-points "keyPoints"
+    :key-splines "keySplines"
+    :key-times "keyTimes"
+    :length-adjust "lengthAdjust"
+    :limiting-cone-angle "limitingConeAngle"
+    :marker-height "markerHeight"
+    :marker-units "markerUnits"
+    :marker-width "markerWidth"
+    :mask-content-units "maskContentUnits"
+    :mask-units "maskUnits"
+    :num-octaves "numOctaves"
+    :path-length "pathLength"
+    :pattern-content-units "patternContentUnits"
+    :pattern-transform "patternTransform"
+    :pattern-units "patternUnits"
+    :points-at-x "pointsAtX"
+    :points-at-y "pointsAtY"
+    :points-at-z "pointsAtZ"
+    :preserve-alpha "preserveAlpha"
+    :preserve-aspect-ratio "preserveAspectRatio"
+    :primitive-units "primitiveUnits"
+    :ref-x "refX"
+    :ref-y "refY"
+    :repeat-count "repeatCount"
+    :repeat-dur "repeatDur"
+    :required-extensions "requiredExtensions"
+    :required-features "requiredFeatures"
+    :specular-constant "specularConstant"
+    :specular-exponent "specularExponent"
+    :spread-method "spreadMethod"
+    :start-offset "startOffset"
+    :std-deviation "stdDeviation"
+    :stitch-tiles "stitchTiles"
+    :surface-scale "surfaceScale"
+    :system-language "systemLanguage"
+    :table-values "tableValues"
+    :target-x "targetX"
+    :target-y "targetY"
+    :view-box "viewBox"
+    :view-target "viewTarget"
+    :x-channel-selector "xChannelSelector"
+    :xlink-actuate "xlink:actuate"
+    :xlink-arcrole "xlink:arcrole"
+    :xlink-href "xlink:href"
+    :xlink-role "xlink:role"
+    :xlink-show "xlink:show"
+    :xlink-title "xlink:title"
+    :xlink-type "xlink:type"
+    :xml-base "xml:base"
+    :xml-lang "xml:lang"
+    :xml-space "xml:space"
+    :y-channel-selector "yChannelSelector"
+    :zoom-and-pan "zoomAndPan" })
 
 
 (defn get-class [attrs]



(defn normalize-attr-key ^String [key]
  (let [^String str (or (attr-mapping key)
                        (str/lower-case (to-str key)))]
    (if (or (.startsWith str "data-")
            (.startsWith str "aria-")
            (.startsWith str "-"))
      str
      (str/replace str "-" ""))))


(defn escape-html [^String s]

      (not value)      :nop
      (true? value)    (append! sb " " attr "=\"\"")
      (.startsWith attr "on")            :nop
      (= "dangerouslySetInnerHTML" attr) :nop
      :else            (append! sb " " attr "=\"" (to-str value) "\""))))


