For the href to work properly you need the protocol as well. The browser simply sees www.google.com
as a relative link because it doesn't have a protocol with it. Assign the protocol and you'll be set. It's not a Kentico "thing", it's a browser "thing" and your href needs to be in the proper format. I'd suggest ensuring the input checks for a protocol or your output checks for the protocol.