JSFiddle - React, Tailwind, and code Playground
HTML
<a href="http://stackoverflow.com
/questions/
22831988/
string-attribute-values-in-multiple-lines-html">
LINK
</a>
JavaScript
var anchor = document.getElementsByTagName("a");
for(var i=0; i<= anchor.length; i++) {
var href = anchor[i].href.replace(/%20/g,'');
anchor[i].href = href;
}