license /**
 * Converts attributes like xlink:href to href
 */ export default function fixXHtmlHref ( el ) { for ( const tag of el . getElementsByTagName ( 'image' ) ) { if ( ! tag . getAttributeNames ( ) . some ( ( x ) => x === 'href' ) ) { for ( const attrName of tag . getAttributeNames ( ) ) { if ( attrName . endsWith ( 'href' ) ) { tag . setAttribute ( 'href' , tag . getAttribute ( attrName ) ! ) ; } } } } }