Added full attribute escaping.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 5s

This commit is contained in:
Willem Cazander 2024-07-17 13:24:47 +02:00
parent 4e27098c3b
commit 3041dcfff2

View file

@ -13,7 +13,7 @@ $(call mb-make-call,mb-doc-variable-rock,MB_MAKE_XML_CDATA_END,Expanded special
define _escape-xml-attr
$(MB_   )$(subst <,&lt;,$(subst >,&gt;,$(subst $(MB_MAKE_XML_CDATA_START),,$(subst $(MB_MAKE_XML_CDATA_END),,$(1)))))
$(MB_   )$(subst ',&apos;,$(subst ",&quote;,$(subst &,&amp;,$(subst <,&lt;,$(subst >,&gt;,$(subst $(MB_MAKE_XML_CDATA_START),,$(subst $(MB_MAKE_XML_CDATA_END),,$(1))))))))
endef
define mb-make-xml-open
$(MB_   )$(MB_MAKE_XML_LT)$(1)$(if $(2), $(2)$(MB_MAKE_EQUALS)\"$(call mb-make-call,_escape-xml-attr,$(3))\")$(if $(4), $(4)$(MB_MAKE_EQUALS)\"$(call mb-make-call,_escape-xml-attr,$(5))\")$(MB_MAKE_XML_GT)