The href attribute can be unusual when represented in data-mw.attribs:
$ echo '[{{1x|http://example.com}}]' | php bin/parse.php <p data-parsoid='{"dsr":[0,27,0,0]}'><a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink nofollow" href="http://example.com" class="external autonumber" data-parsoid='{"a":{"href":"http://example.com"},"sa":{"href":"{{1x|http://example.com}}"},"dsr":[0,27,26,1]}' data-mw='{"attribs":[[{"txt":"href"},{"html":"<a rel=\"mw:ExtLink nofollow\" href=\"http://example.com\" about=\"#mwt3\" typeof=\"mw:Transclusion\" class=\"external free\" data-parsoid='{\"stx\":\"url\",\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[1,26,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"http://example.com\"}},\"i\":0}}]}'>http://example.com</a>"}]]}'></a></p>
There, the "rich" value of the href attribute is <a class="external free" href="http://example.com">http://example.com</a> that is, it is parsing the argument to {{1x}} as if it were the standalone wikitext http://example.com and making a free external link out of it. A similar case is [[{{1x|My Red Link}}]] which generates a more valid-looking data-mw.attrs.href:
<p data-parsoid='{"dsr":[0,22,0,0]}'><a typeof="mw:ExpandedAttrs mw:LocalizedAttrs" about="#mwt2" rel="mw:WikiLink" href="./My_Red_Link?action=edit&redlink=1" title="My Red Link" class="new" data-parsoid='{"stx":"simple","a":{"href":"./My_Red_Link"},"sa":{"href":"{{1x|My Red Link}}"},"dsr":[0,22,null,null]}' data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,20,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"My Red Link\"}},\"i\":0}}]}'>My Red Link</span>"}]]}' data-mw-i18n='{"title":{"lang":"x-page","key":"red-link-title","params":["My Red Link"]}}'>My Red Link</a></p>Here the "html" contents of the href are <span typeof="mw:Transclusion">My Red Link</span>, but the actual href is ./My_Red_Link?.... which is not simply the "plain text" version of the rich data-mw.attrs.href attribute at all. We also need to be careful about how the title is generated here: currently it is generated as a i18n message involving the non-converted link as a message argument.
Briefly, we need to use the rich value of the href attribute, language convert it (excluding free external links), and then rewrite it into the href attribute after first converting it to an absolute path... which may involve adding a ./ prefix so that any : embedded in the converted text aren't misinterpreted as a URL protocol.
See T415581: Parsoid uses inconsistent "rich attribute" format for the `alt`, `title`, and `href` tags in images. for more details.