Just curious, are you sure that the href is sanitize here ? (Does not contains any <script> tag for example). Otherwise you may prefer to append a textNode.